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 column problem.

I''m having a problem with a GDBG with multiple columns of combo boxes. I have a grid that has several columns with combo boxes set up using a choice list, and one column that is set up to look up its display string in another DataTable. This all works OK, except if you use the combobox to change one of the values in a column that uses a choicelist _after_ changing a value in the column that uses the lookup table, it crashes. The columns don''t depend on each other, i.e. I''m not using one to filter another. I get a System.NullReferenceException The column that uses the lookup table has some null values in it and the lookup table has a row in it where the valuemember is null and the displaymember is "(none)". This works and doesn''t seem to affect the problem since it behaves the same way even if I take the nulls out of the data and the lookup table. I wrote a small sample to demonstrate the problem. Let me know if the explanation above isn''t clear or if it would otherwise be useful and I can send it. Thanks, Dave

2 Replies

AD Administrator Syncfusion Team July 6, 2005 11:25 PM UTC

You could try registering a second combobox celltype. This way you use the the default "ComboBox" celltype for your DataSource comboboxes and then use the new "ComboBox1" celltype for the choicelist combobox. Here is a snippet that will register teh new combobox celltype. grid.Model.CellModels.Add("ComboBox1", new GridComboBoxCellModel(grid.Model));

DF Dave Fabiszak July 7, 2005 12:00 AM UTC

Thanks Clay, That fixed it. Dave

Live Chat Icon For mobile
Up arrow icon