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

GanttView OneHour major tick line display format - 12 vs 24h

1 Answer 103 Views
GanttView
This is a migrated thread and some comments may be shown as answers.
Bartosz
Top achievements
Rank 1
Bartosz asked on 16 Nov 2017, 02:04 PM

Hi,

I'm using RadGanttView in my program with considerable success but there's one problem that I don't know how to solve.

 

The view in my program will be displayed with different time scales (from minutes to hours per major tick) and with different CultureInfo for different clients.

I observed that when I set a culture info that requires displaying hours in 24 hour format I get that format in the time ruler view when major tick lines are 15 minutes apart, but not when they are 1h apart. 

I poked around the ganttView object itself and I found out that the are no tick lines defined in default version of ganttView in its publicly available property TimeRulerLines. But if I debug the object and reach into its private field of timeRulerDataSource there is a collection of intervals defined for TimeRulerLines of type MajorTickLines.

ganttViewObject.timeRulerDataSource.TimeRulerSettings.TimeRulerLines[index for type (MajorTickLines)]

In this collection I could see that the intervals of FifteenMinutes and less had FormatString defined with "HH" (24h format, as required by the specified culture info) but for OneHour and more the format string is null.

How can I reliably adjust the OneHour tick interval format string in a way that would make no assumptions about the intervals defined by the user of my code and at the same time through some publicly available path of properties?

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 21 Nov 2017, 12:05 PM
Hello Bartosz,

It seems that the desired behavior is not supported. We always appreciate customers feedback related to our components. For that reason, I have logged your suggestion as a feature request in our feedback portal. I would encourage you to vote and this will increase its priority when we consider our future development plans. You may track its progress following this link.

I updated your Telerik points for bringing this to our attention. In the meanwhile you can set the FormatString of the to the desired format, more details could be found in TimeRulerLines article. I created and attached a sample project for you that shows the described approach, hope this is helpful.

Regards,
Martin Vatev
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which you to write beautiful native mobile apps using a single shared C# codebase.
Tags
GanttView
Asked by
Bartosz
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or