Hello!
Any ideas how you successfully implement the ICellEditor and ICellViewer interfaces so that you can use a WinComboBox with the grid? I’ve successfully (and quite painlessly) implemented the interfaces for WinCheckBox as well as WinDatePicker, but WinComboBox is leaving me clueless. I think it’s the SetControlValue method that’s wrongly implemented, here’s how it looks:
void ICellEditor.SetControlValue(object value, IFormatProvider customFormatProvider)
{
this.SelectedItem = (ComboBoxItem)Convert.ChangeType(value, typeof(ComboBoxItem), customFormatProvider);
}
When I try to edit the cell this editor is in, it lags for a moment and I see the WinXP-style border of the control, but then it disappears and only white is shown in the cell. No button or drop down or anything. I had a similar issue before with my implementation of a custom WinDatePicker, in that case I had implemented SetControlValue wrong and fixing it fixed the issue. It works perfectly now. This is why I figured it might be the same problem with this control.
Any clues?
Imported from legacy forums. Posted by macke (had 2115 views)