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

Simple example about creating/populating a Drop Down columns in Grid

I have a custom data source (IList) and I would like to have a Drop Down column with a list of predefined values in some of the columns. Once the DataSource property is updated, I would like to change some of the columns to a GridListControl style. Does anybody has a simple example related to this? TIA Jose

3 Replies

AD Administrator Syncfusion Team June 16, 2003 04:34 PM UTC

Here is a sample. It has a GridDataBoundGrid with a column being a GirdListControl.

JM Jose M. Gonzalez June 16, 2003 06:56 PM UTC

Thanks Clay for your promptly answer. Now I have another question: Is there any other way to populate the list of possible values in a GridListControl column (instead of using style.DataSource = dataSetX)? Since I'm using a pure domain model (no datasets)I need to have the combo value list populated with strong type objects and whenever the user selects any item, it will go directly to the corresponding property in the domain class. I was thinking about creating a GridListControl Factory (since I can have multiple grid intances opened at the same time) and link the Column directly to a given DropDownControl, so I can reuse the DropDown controls. Does that sound reasonable? Any suggestion? TIA Jose

AD Administrator Syncfusion Team June 16, 2003 08:25 PM UTC

DataSource can be any object that supports either IList or IBindingList, so you should be able to use a strongly typed collection. The Syncfusion\Essential Suite\Grid\Samples\Quick Start\GridListControlSample sample uses an ArrayList of objects as DataSource for a GridListControl. Normal behavior for a grid is to share a single instance of each cell control. So, if you have 5000 GridListControl cells, there is only 1 GridListControl. So, I am not sure you need to try inplementing a GridListControl factory.

Live Chat Icon For mobile
Up arrow icon