This is a migrated thread and some comments may be shown as answers.

Need to set truncate the hours from Date and Duration column

6 Answers 51 Views
GanttView
This is a migrated thread and some comments may be shown as answers.
kanna
Top achievements
Rank 1
kanna asked on 13 Sep 2012, 10:44 AM
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

6 Answers, 1 is accepted

Sort by
0
Ventzi
Telerik team
answered on 14 Sep 2012, 02:09 PM
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.

0
kanna
Top achievements
Rank 1
answered on 15 Sep 2012, 07:52 AM
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
0
Ventzi
Telerik team
answered on 17 Sep 2012, 02:18 PM
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.

0
kanna
Top achievements
Rank 1
answered on 17 Sep 2012, 04:00 PM
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
0
Accepted
Ventzi
Telerik team
answered on 18 Sep 2012, 12:00 PM
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.

0
kanna
Top achievements
Rank 1
answered on 18 Sep 2012, 04:41 PM
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
Tags
GanttView
Asked by
kanna
Top achievements
Rank 1
Answers by
Ventzi
Telerik team
kanna
Top achievements
Rank 1
Share this question
or