I have a problem with my combobox in datagrid, instead of displaying the data from my model list, it is showing the classname, please see attached project.
Hi Glenn,
#1927 is fixed in our latest Wisej build (2.0.32).
Best regards
Frank
That’s because you are not setting the DisplayMember so Wisej displays the result of ToString().
In your sample you set the DisplayMember on the Column but don’t set the data source, then when the control is shown you set the datasource directly on the combobox used in the cell without the DisplayMember. Change your code like this:
Thanks, but I have another problem, when I type in a value that is not in the list, it gives me an error “new value” cannot be converted to system.string.
Thanks.
Unfortunately the second problem you mentioned is a bug/regression (#1927). This is a quick workaround.
private void DataGridView1_CellParsing(object sender, DataGridViewCellParsingEventArgs e) { e.ParsingApplied = true; } private void DataGridView1_DataError(object sender, DataGridViewDataErrorEventArgs e) { e.Cancel = false; }
Th fix will be available in this upcoming build (early next week).
Please login first to submit.