stringformat for mergedcells

3 posts, 1 answers
  1. mark
    mark avatar
    5 posts
    Member since:
    Mar 2019

    Posted 12 Feb Link to this post

    I have a gridview with a databound datetime column in it.

    I can change its dataformatstring (or stringformat in binding) so that it shows the date in a short format (dd-mm-yyyy in dutch).

    However, when those cells merge, it changes its format to include the time. This means I have a lot of cells that show something like '1-1-2021 00:00:00'.

    How can I change that stringformat as well? I could only find a property called contentstringformat, which doesnt do anything.


  2. Answer
    Vladimir Stoyanov
    Vladimir Stoyanov avatar
    756 posts

    Posted 17 Feb Link to this post

    Hello Mark,

    Thank you for the provided information. 

    I tested the scenario on my end, however I was not able to replicate the same result. On my end the merged cells are formatted in the same manner as the rest of the cells in the column. That is why I am attaching the sample project that I used for testing purposes. Can you check it out and see how it differs from the setup on your end?

    Should you need any further assistance, can you modify the sample project in order to demonstrate the observed on your end behavior and send it back in a new support ticket (since project files cannot be attached to forum posts)? This will allow us to investigate the scenario and better assist you. 

    Looking forward to your reply.

    Vladimir Stoyanov
    Progress Telerik

    Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at

  3. mark
    mark avatar
    5 posts
    Member since:
    Mar 2019

    Posted 18 Feb in reply to Vladimir Stoyanov Link to this post

    Based on your project I figured out the difference.

    I was referencing a nested property of a custom type.

    I basically had DataMemberBinding="{Binding}", which works in the cell, but not in the mergedcell.

    Changing it so I had a readonly property 'date', to bind to directly fixed my issue.

    I'm guessing it's because now it is recognizing it as a date property? 

    Thanks a lot for the example project, that really helped!

Back to Top