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 grid bound to a dataset table which contains a "status" column with integer numbers from 0 to 5. I would like to use a combobox celltype to display this information and map each of the numbers to a textual description. eg.
0 = Lemon
1 = Apple
2 = Bananna
3 = Peach
4 = Orange
5 = Pear
So when the column loads the dropdown is selected at the correct index showing the text description of the underlying numeric value. Then the user can drop the menu down to select a different fruit whereupon the underlying dataset value is changed to its numeric mapping.
Thanks
Mark
ADAdministrator Syncfusion Team June 1, 2004 07:35 AM
You can create a second datatable with 2 columns, one holding 0 - 5 and the other holding lemom through pear. Then set the GridBoundColumn.StyleInfo.DataSource to this DataTable. Also set the DisplayMember and ValueMember for this same combobox column in your grid. Here is a little sample.
WindowsApplication11_6533.zip
ADAdministrator Syncfusion Team June 1, 2004 08:06 AM
Thanks,
Just as an aside is there a way to achive the same result without creating a second datatable?
Mark
ADAdministrator Syncfusion Team June 1, 2004 10:44 AM
You do have to create some type of datasource for your combobox with two public properties in it. It does not have to be a DataTable, but it does have to have the two properties. So, you could use an ArrayList of objects with two public properties, or some list that implemented ITypedList, or ???