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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GDBG ComboBox cell problem

Thread ID:





23832 Jan 20,2005 05:29 PM UTC Jan 20,2005 07:47 PM UTC WinForms 4
Tags: GridControl
Ken Law
Asked On January 20, 2005 05:29 PM UTC

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?

Administrator [Syncfusion]
Replied On 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?

Ken Law
Replied On 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).

Administrator [Syncfusion]
Replied On 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.

Ken Law
Replied On 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.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon