Hi,
I have a griddatacontrol bound to a DataTable object. One of the datatable columns holds an Int32-Value indicating a status of the row entry.
I managed to display a ComboBox in the column showing this state-Value from an StringCollection:
<syncfusion:GridDataVisibleColumn.ColumnStyle>
<syncfusion:GridDataColumnStyle CellType="ComboBox" DropDownStyle="Exclusive">
</syncfusion:GridDataColumnStyle>
...
StringCollection
exampleList = new StringCollection();
exampleList.Add(
"One");
exampleList.Add(
"Two");
exampleList.Add(
"Three");
this.m_dbGrid.VisibleColumns["Wert-Typ"].ColumnStyle.ItemsSource = exampleList;
m_dbGrid.ItemsSource = m_oKommClient.m_dbNormName;
My problem is now, that I can select the Values from the collection in the grid (e.g. One, Two, Three) but bound to the database is the index (e.g. 0, 1, 2). So my selection of the comboboxstring would result in an format exception.
<see attachement>
How can I tell the grid the bind to the values and to diplay the names?
Similar to ComboBox.DisplayMember and ComboBox.ValueMember...
Thanks in advance!
Martin
test_3b043ed9.zip