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

GDBG ComboBox cell problem

I''ve added a choice list to a GDBG ComboBox cell as follows: StringCollection HWDivChoices = new StringCollection(); HWDivChoices.Add("1"); HWDivChoices.Add("2"); HWDivChoices.Add("4"); HWDivChoices.Add("8"); 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 Any ideas?

4 Replies

AD Administrator Syncfusion Team January 20, 2005 05:52 PM UTC

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?

KL Ken Law January 20, 2005 07:21 PM UTC

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).

AD Administrator Syncfusion Team January 20, 2005 07:40 PM UTC

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.

KL Ken Law January 20, 2005 07:47 PM UTC

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.

Live Chat Icon For mobile
Up arrow icon