cannot implement DisplayValueFormat in DataGridDateColumns

3 posts, 0 answers
  1. Joshua
    Joshua avatar
    5 posts
    Member since:
    Aug 2016

    Posted 03 Oct Link to this post

    I am having a hard time figuring things out in formatting the date.

    Basically I expect that I can use the DisplayValueFormat of RadGridDatePicker in DataGridDateColumns. As what they said here: The DataGridDateColumns is used to represent DateTime objects. It uses the RadDatePicker control to pick a value in EditMode http://docs.telerik.com/windows-universal/controls/raddatagrid/columns/datagrid-datecolumn.

     

    http://docs.telerik.com/windows-universal/controls/raddatepicker-and-radtimepicker/properties-and-configuration/raddatetimepickers-properties-pickerproperties

  2. Lance | Tech Support Engineer, Sr.
    Admin
    Lance | Tech Support Engineer, Sr. avatar
    138 posts

    Posted 04 Oct Link to this post

    Hello Joshua,

    The DataGrid's columns have a property named CellContentFormat that lets you apply a string format.

    You didn't specific which format you wanted, so I used the DateTime string format "d" in this example:

    <grid:DataGridDateColumn PropertyName="GraduationDate" CellContentFormat="{}{0:d}">


    Here is a screenshot of the result and I've also attached a runnable demo that you can use to see the approach in action.

    Please let us know if you have any further questions. Thank you for contacting Support and for choosing Telerik by Progress.

    Regards,
    Lance | Tech Support Engineer, Sr.
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft banner
  4. Joshua
    Joshua avatar
    5 posts
    Member since:
    Aug 2016

    Posted 12 Oct in reply to Lance | Tech Support Engineer, Sr. Link to this post

    it worked. thanks!
Back to Top