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 List Data Source

I have a grid with two columns, Part and Color. They are both comboboxes. The color combobox DataSource is set to a DataView with a filter set to the part. As long as the user selects parts with the same list of colors, everything is fine. When a part with a different list is selected, all parts already in the grid with a color that is no longer in the color view is changed to null. What do I need to do to display a list of colors specific to a part, yet also display all existing rows? Ken

5 Replies

AD Administrator Syncfusion Team August 8, 2005 05:11 PM UTC

I think you will need to set the DataSource on the color column''s GridBoundcolumn.StyleInfo to be a list of all possible colors. Then in CurrentCellShowingDropDown, you can filter the list of colors to restrict them to what you want. Here is a KB that describes something similar. http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=115

AD Administrator Syncfusion Team August 8, 2005 07:36 PM UTC

I looked at the KB article, but still couldn''t get my code to work right. I''ve attached a small sample that illustrates my problem. Ken GridTest_8015.zip

AD Administrator Syncfusion Team August 8, 2005 07:50 PM UTC

The technique in the KB seems to work. http://www.syncfusion.com/Support/user/uploads/GridTest_390f25b8.zip

AD Administrator Syncfusion Team August 8, 2005 08:07 PM UTC

I cannot open your sample. Big complaints about the license. We''re using version I see that you used the showing dropdown event. Can a user tab into the color cell and type a "w" and have "White" appear with that event? Ken

AD Administrator Syncfusion Team August 8, 2005 08:12 PM UTC

Nevermind Clay. When I pasted your showdropdown code into my cellactivated event, my sample worked. The only difference seems to be your use of the renderer. I''ll try it in the real code and see what happens. Thanks. Ken

Live Chat Icon For mobile
Up arrow icon