Need to set truncate the hours from Date and Duration column

7 posts, 1 answers
  1. kanna
    kanna avatar
    28 posts
    Member since:
    Aug 2007

    Posted 13 Sep 2012 Link to this post

    Hi,

    I am using RadGanttView for silverlight, i want remove the hour part from the Date and duration column, that need to show the duration column and StartDate,End date columns with out time value.

    And also please let me know how to set the tick interval in c# code and set the GanttView accordingly.

    Regards,
    Kannan S
  2. Ventzi
    Admin
    Ventzi avatar
    114 posts

    Posted 14 Sep 2012 Link to this post

    Hello kanna,

    I am not sure I understand you fully, but if you just want to remove the hour from the date you need to write a ValueConverter for DateTime (Start, End properties)  and TimeSpan (Duration property), that returns a custom string format. You can find more info about custom string formats here and here. I am sending you attached a sample project which demonstrates how converters work and also how to set the tick interval in code behind.

    Greetings,
    Ventzi
    the Telerik team

    Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

  3. DevCraft banner
  4. kanna
    kanna avatar
    28 posts
    Member since:
    Aug 2007

    Posted 15 Sep 2012 Link to this post

    Hi Ventzi
    Thanks for the sample, when i am trying to run the application. It is throwing error No matching constructor cannot find .
    Please help me to resolve the issue.

    Regards,
    Kannan S
  5. Ventzi
    Admin
    Ventzi avatar
    114 posts

    Posted 17 Sep 2012 Link to this post

    Hello Kannan,

    Would you please provide some more information about the error?  Sending the stack trace or a sample project that reproduces the problem will be of great help.

    Also please make sure that you're using the latest version of the controls.

    Kind regards,
    Ventzi
    the Telerik team

    Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

  6. kanna
    kanna avatar
    28 posts
    Member since:
    Aug 2007

    Posted 17 Sep 2012 Link to this post

    Hi Ventzi,

    I am using RadControls 2012 Q2 for Silverlight5. When i am selecting the property of the project it is showing the target framework as .Net Framework Client profile.
    But i am using Silverlight 5 only, so i have created a sample silverlight5 project and pasted the code also.
    But it isshowing the error Cannot find the matching constructor error in Convertor class.

    Regards,
    Kannan S
  7. Answer
    Ventzi
    Admin
    Ventzi avatar
    114 posts

    Posted 18 Sep 2012 Link to this post

    Hi kanna,

    Please get the latest internal build of our controls. Normally there is no need of constructor in the Converter class. We've also attached the Silverlight 5 version of the sample project.

    Greetings,
    Ventzi
    the Telerik team

    Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

  8. kanna
    kanna avatar
    28 posts
    Member since:
    Aug 2007

    Posted 18 Sep 2012 Link to this post

    Hi Ventzi,

    Thanks for your sample it is working fine.One more clarification i am using telerik RadControls for Silverlight 2012 Q2.
    Please let me know i need to update the latest version to work on the same or it is not needed.

    Regards,
    Kannan S
Back to Top
DevCraft banner