GridListControl event question
I have a column of GridListControls in my grid control. See the attached picture. When the user selects a row from the GridListControl, I want the values of PRGSERNUM, PRGNAME, SMPTNAME, and RUN to display on the grid control. How can I do this?
gridlistcontrol_1024.zip
SIGN IN To post a reply.
4 Replies
AD
Administrator
Syncfusion Team
August 11, 2004 03:58 PM UTC
I am not sure I understand.
When you drop one of the GridListControl cells, you want to not see the GridListControl drop, but instead want to replace the values in the main grid with values from the dropped gridlistcontrol? How long to the values stay there? What makes them go away?
There is a CurrentCellShowingDropDown event that you can catch to try to do something, but I am not sure I undetstand what you want.
JT
James Tran
August 11, 2004 04:14 PM UTC
Sorry, I was not very clear. Let me try again. Take a look at the picture in my first post. Notice how the current selected row in the GridListControl is: 458412, SG2, MRPD1, 2.
Now, the user clicks on that row and the GridListControl pop up window disappears. What you see now is just the grid control. What I want is for the PRGSERNUM, PRGNAME, SMPTNAME, and RUN columns for the grid control to read: 458412, SG2, MRPD1, 2.
I hope that was more clear.
>I am not sure I understand.
>
>When you drop one of the GridListControl cells, you want to not see the GridListControl drop, but instead want to replace the values in the main grid with values from the dropped gridlistcontrol? How long to the values stay there? What makes them go away?
>
>There is a CurrentCellShowingDropDown event that you can catch to try to do something, but I am not sure I undetstand what you want.
>
>
AD
Administrator
Syncfusion Team
August 11, 2004 04:58 PM UTC
With a GridControl, you have two options to do this, explicitly setting the values when the GridListControl cell changes, or dynamically getting the values when the grid needs a particular value.
To do the first one, handle CurrentCellCloseDropDown. There get the current DataRow from the DataSource of the GridListControl cell, and then explicitly set the values you want to see in the GridControl for the row. (You can use grid.CurrentCell.RowIndex to get the grid row).
To do the second way, try handling the Grid.QueryCellInfo event. Then if e.ColIndex is 2, 3, 4, 5 and e.RowIndex > 0, then use grid[e.RowIndex, 1].Cellvalue to get the value from the corresponding items from the GridListControl cell. Then set e.Style.Text depending upon e.ColIndex.
AD
Administrator
Syncfusion Team
August 11, 2004 05:10 PM UTC
Here is a little sample using the first technique.
WindowsApplication7_3200.zip
SIGN IN To post a reply.
- 4 Replies
- 2 Participants
-
JT James Tran
- Aug 11, 2004 03:43 PM UTC
- Aug 11, 2004 05:10 PM UTC