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

GDBG ComboBox cell problem

Thread ID:

Created:

Updated:

Platform:

Replies:

23832 Jan 20,2005 12:29 PM Jan 20,2005 02:47 PM Windows Forms 4
loading
Tags: GridControl
Ken Law
Asked On January 20, 2005 12:29 PM

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 3.0.1.0. Any ideas?

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

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

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

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

CONFIRMATION

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.

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.

;