I''ve added a choice list to a GDBG ComboBox cell as follows:
StringCollection HWDivChoices = new StringCollection();
dbgEncoders.GridBoundColumns["HWDivider"].StyleInfo.ChoiceList = HWDivChoices;
This choicelist drops down and is correct but if I try to choose one of the items, the value of the cell does not change. I''ve used this exact same method in other grids and it works fine. I''m using 184.108.40.206. Any ideas?
ADAdministrator Syncfusion Team January 20, 2005 12:52 PM
Are there any exceptions listed in your output window?
Is the CellValueType for this column a string? What other StyleInfo properties do you have set for this column? For example, is it readonly?
KLKen LawJanuary 20, 2005 02:21 PM
There are no exceptions listed, but I''m loading the form manually using Reflection so its possible I might not see an exception.
The only StyleInfo properties I changed were CellType (ComboBox) and DropDownStyle (Exclusive). CellValueType was not changed (from nothing).
A thought a possible problem was the underlying type in the dataset was int. However, I changed it to a string, and I also changed the CellValueType to string, but neither worked.
If I add a row to the grid, save the dataset, then run the form again and read in the data, the combobox starts working. This happened even before I changed the underlying dataset type to string (from int).
ADAdministrator Syncfusion Team January 20, 2005 02:40 PM
Can you post a sample project showing the problem?
If it is a null value problem, then using a DataTable datasource for the combobox column may avoid the problem.
KLKen LawJanuary 20, 2005 02:47 PM
Interesting you should suggest that. I did what I probably should have started with. I made both the dataset type and the CellValueType in the grid an int. Then I created an array of integers and used that as the datasource of the GridBoundColumn''s StyleInfo. Everything works fine. Thanks.