编辑的时候不会更新数据源。
建议在C1DateTimePicker的Focus丢失的时候,强制结束编辑状态。
代码参考:
- void test_PrepareCellForEdit(object sender, CellEditEventArgs e)
- {
- C1DateTimePicker dtp = (C1DateTimePicker)(((Border)e.Editor).Child);
- dtp.LostFocus -= dtp_LostFocus;
- dtp.LostFocus += dtp_LostFocus;
- }
复制代码- private void dtp_LostFocus(object sender, RoutedEventArgs e)
- {
- C1DateTimePicker dtp = sender as C1DateTimePicker;
- dtp.FinalizeEditing();
- }
复制代码 |