Home Forums WinForms controls Xceed Grid for WinForms Editing Time in the grid

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #16730 |

    I have a grid bounded to the datatable. One of the columns is DateTime of the format “M/d/yyyy h:mm tt”.

    If I set Column.Readonly = false then user is able to set the date using combobox and the datepicker. However, it does not allow me to edit the time in the combobox.

     

    How to edit both date and time?

    Imported from legacy forums. Posted by www (had 514 views)

    User (Old forums)
    Member
    Post count: 23064

    The default editor in the grid for a DateTime column does not support time.  You will need to replace the default editor with a control that supports both date and time editing.  We do not have such a control.

    You can use the CellEditorManager and CellViewerManager to replace the default editor.

    e.g.:

    DateTimePicker dtPicker = new DateTimePicker();

    gridControl1.Columns[

    “DateColumnn” ].CellEditorManager = new CellEditorManager( dtPicker, “”, true, true );

    gridControl1.Columns[

    “DateColumnn” ].CellViewerManager = new CellViewerManager( dtPicker, “” );

     

     

    Imported from legacy forums. Posted by André (had 758 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.