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 CellType in a Unbound Grid

I am trying to have a cell in the grid use the GridListControl CellType. I'm having a hard time figuring out how to use this. I try looking at your CellType Example, but couldn't figure out how the Cell is set to a particular data source. I had a dataview with my data, and couldn't get that to work. I tried then creating an ArrayList with the data and set that to the datasource and that didn't work either. I was able to populate the dropdown by handling the CurrentCellShowingDropDown event. I had to loop thru my data and populate each row by hand. This works, except that now I can't get the selected value to display in the cell. I tried setting the Text Property of the Cell in the events CurrentCellCloseDropDown and CurrentCellShowedDropDown and that didn't work. My data is very simple, its just an ID, CodeValue and Description. In the dropdown I want to display the CodeValue and Description. On the Cell I want to display the CodeValue. The ID is what I need to write back to the database. Any help would be appreciated. An example in VB would be great as well. Thank You. Javier

6 Replies

AD Administrator Syncfusion Team October 3, 2003 05:45 PM UTC

If you want to show the GridListControl celltype in a regular grid check out the following sample: Essential Suite\Grid\Samples\CellTypes\ComboboxCells It also demonstrates setting up ListBox. Stefan


AD Administrator Syncfusion Team October 3, 2003 05:51 PM UTC

I don't have this example. Was this something added in the newer versions?? I'm using 1.5.2 Javier > If you want to show the GridListControl celltype in a regular grid check out the following sample: > > Essential Suite\Grid\Samples\CellTypes\ComboboxCells > > It also demonstrates setting up ListBox. > > Stefan


AD Administrator Syncfusion Team October 3, 2003 06:11 PM UTC

It is in version 1.6. If you open a DirectTrac incident we can send you download instructions for the latest version. Or you could also simply login to the support site and download it there. Stefan


AD Administrator Syncfusion Team October 3, 2003 06:23 PM UTC

I have the latest version, but because of issues with that version, we are not unable to upgrade at this time. All I want is a working example that can show me how the datasource can be set correctly or what events to use to set values on the cell correctly. If the code in that example works in 1.5.2 then please let me know, and I'll reinstall the latest version and try it out. An explanation on how the heck the CellType example (the one in 1.5.2) actually uses and sets the datasource would be great as well. I just don't understand how this works, and the documentation is no help either. Javier > It is in version 1.6. If you open a DirectTrac incident we can send you download instructions for the latest version. > > Or you could also simply login to the support site and download it there. > > Stefan


AD Administrator Syncfusion Team October 3, 2003 08:25 PM UTC

Attached find the sample. I haven't tested it with 1.5.2 but I think it should work or at least give you some insught how to set things up Initializing a grid list control should be straightforward. There are three properties that you need to set: .DataSource .DisplayMember .ValueMember once these are set the cell will save the value indicated by .ValueMember into the grid as cell value and display the string that is associated with it in the cell. You can of course also make both point to the same column in the dataview. Stefan


AD Administrator Syncfusion Team October 6, 2003 04:44 PM UTC

Thank you....this example showed me what I was doing wrong (It doesn't fully work in 1.5.2, but I got the info I needed from it). Thank you again... Javier

Loader.
Live Chat Icon For mobile
Up arrow icon