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'm trying to create a generic control derived from gridcontrol that uses IList as datasource for cell comboboxes. But the grid control tells me that I can only use IList or ISourceList. Is there a way to use generics anyway? I need to support list items in the comboboxes that have a string as displaymember but different value types that I don't know at compile time and I don't want to handle values as non typed objects.
JJJisha Joy Syncfusion Team June 6, 2011 09:12 AM UTC
Hi,
Please refer to the following sample from our sample browser that illustrates the usage of ComboBox and MulticolumnGridList controls in grid cells. The dropdownlist can be populated with items in the following ways:
Through GridStyleInfo.ChoiceList property Through GridStyleInfo.DataSource property
thanks for the feedback. I'm aware of how using dropdowns in cells and were already using it for quite some time. The problem I have is not creating comboboxes but using a C# template class as datasource.
I don't want to use an arraylist or other containers from specialized collections because it does not use the actual types but object and does a lot of boxing/unboxing.
I want to use as container an implementation of IList. When I set
grid[row,col].DataSource = new IList;
I get an error telling me that I can use IList as datasource. So the question is whether I can use generics as datasource or if I still have to use depricated classes like arraylist here.
Regards, Christian
JJJisha Joy Syncfusion Team June 14, 2011 03:42 AM UTC
Hi Christian,
Please refer to the following attached sample, that uses a template class as a datasource to the dropdown in grid cell,