Home Forums WPF controls Xceed DataGrid for WPF DateTime does only show date but no time

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

    Hi,

    I am binding my XCEED Datagrid to an object where a few attributes are of type DateTime. Unfortunately the Datagrid does only display the date. How can i force the datagrid to display date and time?

    Thanks
    Silas

    Imported from legacy forums. Posted by Ralf (had 2951 views)

    User (Old forums)
    Member
    Post count: 23064

    Correction: The display does show the time as well (if there is any in the source).
    After any changes to the cell however i am not allowed to put a time into that cell. I noticed the same in one of your samples (Dynamic Editor Display Sample)

    Imported from legacy forums. Posted by Ralf (had 330 views)

    User (Old forums)
    Member
    Post count: 23064

    I have found a workaround to the problem. Now i am splitting the DateTime in a field with the Date and another with the Time. Code is pretty straight and works well for me. I think the problem is not about your grid because the DateTimePicker from Windows Forms shows the same behavior. However i would be happy for any suggestions how to put this whole thing in one Cell 🙂

    cheers
    Silas

    Imported from legacy forums. Posted by Ralf (had 340 views)

    Xceed Support
    Member
    Post count: 5658

    You would have to design your own CellEditor that allows Date AND Time edition. Since the DatePicker provided only allows Date selection.

    Imported from legacy forums. Posted by Marcus [Xceed] (had 4027 views)

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