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

GridDataBoundGrid cell''s datasource property

I have a column with a combobox where the datasource for the combobox is dependent upon the value of another column in the row (a foreign key column). I''m trying to set the datasource for the combobox cell via the Datasource property like this: grid(row,col).Datasource = SomeMethod(foreignKeyValueForThisRow) In debug mode the datasource remains Nothing after the assignment, even though the method returns an ArrayList with a length > 0. Is there something wrong with this technique? The foreign key column is static for each row, so I''m trying to set this up just once at load time. Or do I need to do it in some event like CurrentCellShowingDropDown? Thanks for any help you can provide! Rick

1 Reply

AD Administrator Syncfusion Team July 11, 2005 08:16 AM

You cannot set cell specific properties (except Text and CellValue) on a GridDataBoundGrid using an indexer. Instead, you either have to set the properties on a column using either grid.GridBoundColumns or grid.Binder.InternalColumns depending upon whether you have explicitly added gridboundcolumns or not. Here is a KB on this. http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=83 But for a porperty like DataSource, you would want to use Model.QueryCellInfo as in this KB. http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=95

Loader.
Live Chat Icon For mobile
Up arrow icon