We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

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

4 Replies

AD Administrator Syncfusion Team August 11, 2004 11:58 AM

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 12:14 PM

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 12:58 PM

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 01:10 PM

Here is a little sample using the first technique. WindowsApplication7_3200.zip

Loader.
Live Chat Icon For mobile
Up arrow icon