DateFormat problem

5 posts, 0 answers
  1. GOURVEZ JJ
    GOURVEZ JJ avatar
    55 posts
    Member since:
    Dec 2009

    Posted 12 Jan 2012 Link to this post

    Hi,

    I use radgrirview in an application.
    I have same code that example "GridView Edit Template".
    Bu I have an problem.

    When I choose an date, radgridview dysplay date and time (00:00:00)

    Does it possible do not dysplay time ?

    Thanks
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 12 Jan 2012 Link to this post

    Hello,

    How have you defined your CellEditTemplate? You could set a string format to show what you need. For example for the GridViewDataColumn this would look like so:
    <telerik:GridViewDataColumn DataMemberBinding="{Binding DateEstablished}" DataFormatString="{}{0:yyyy/mm/dd}">


    Greetings,
    Didie
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  3. GOURVEZ JJ
    GOURVEZ JJ avatar
    55 posts
    Member since:
    Dec 2009

    Posted 12 Jan 2012 Link to this post

    Thanks it's perfect, I changed variable type (string to DateTime) and add dataFormatString

  4. Raja
    Raja avatar
    3 posts
    Member since:
    Oct 2012

    Posted 20 Feb 2013 Link to this post

    How to make the DataFormatString="{}{0:yyyy/mm/dd}"
    work for autogenerated columns for datetime? 
  5. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 21 Feb 2013 Link to this post

    Hello,

     You can set desired property for desired column using AutoGeneratingColumn event.

    Regards,
    Vlad
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top