The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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
ADAdministrator Syncfusion Team July 11, 2005 01:16 PM UTC
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