This project is read-only.

grid cell Display value is not correct

Dec 17, 2010 at 8:33 AM

I  Change the  the  method CreateControl of  class  DateTimePicker  Editors  and Modified like this  

dtPicker.Format = DateTimePickerFormat.Custom; dtPicker.CustomFormat = "yyyy-MM-dd HH:mm:ss"; 

and I Create o DateTime Column  Flowing the code :

  grid1[rowsCount, 4] = new SourceGrid.Cells.Cell(DateTime.Now);
  grid1[rowsCount, 4].Editor = new SourceGrid.Cells.Editors.DateTimePicker();

but the column4 value is not we expected  (2010-12-13 13:00:13)   and it diplay value is   2010-12-13 13:00  it lost parts of seconds, but when i edit the  column  i can see the seconds ;

and How can I solve this  problems?

thx!

Dec 17, 2010 at 9:17 AM

You changed editor cell, so this is why you see seconds when you edit cell.

You should change the view of a cell instead.  There are examples in SourceGrid which show how to do that

Dec 18, 2010 at 4:35 AM

Thank you very much ,you helped me !