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

RadTrackBar as time periode selector

3 Answers 32 Views
TrackBar
This is a migrated thread and some comments may be shown as answers.
Marco
Top achievements
Rank 2
Veteran
Marco asked on 18 Aug 2014, 02:19 PM
Hello,

I have started to use a RadTrackBar to select a range of date. As the radtrackbar only support Integer type for the value, I convert the control value to date with a reference date which represent value 0 on the control. It's working fine.

I have just a little question about the visual tick.

The total range in the RadTrackBar represent a year and a few month and it isn't really human readable with a visual tick on every day. So I want to put a tick on each value representing the first day of a month (with a label) instead. As the number of day in a month isn't fixed, it isn't possible to use the Frequency property of the control to draw theses ticks.

Is there a way to place tick on specific value (0,31,59,90,121, etc...) ?

Thanks for reading

Marco Guignard

3 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 21 Aug 2014, 12:19 PM
Hello Marco,

Thank you for writing.

RadTrackBar introduces TickFormatting and LableFormatting events in order to facilitate the standard customization through the element tree of the control. In the TickFormatting event handler you can set the TickElement.Visibility property to Collapsed for all the ticks that you want to hide. The same approach can be followed for the LabelElement in the LableFormatting event. You can refer to TrackBar >> Customization help article about this topic. If this is not suitable for your specific case, please specify in more details the expected design. Any sample screenshots would be greatly appreciated.

I hope this information helps. Should you have further questions, I would be glad to help.

Regards,
Desislava
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Marco
Top achievements
Rank 2
Veteran
answered on 21 Aug 2014, 02:59 PM
Hi Desislava,

I will try to play around with the TickFormatting and LabelFormatting event.

Convert the value back to a date, test for beeing the first day in date and collapse the tick on failure.

Thanks for the idea

Marco Guignard


0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 26 Aug 2014, 10:17 AM
Hello Marco,

Thank you for writing back.

I am glad that the suggested solution seems to suit your requirement. If you have any additional questions, please just let me know.

Regards,
Desislava
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
TrackBar
Asked by
Marco
Top achievements
Rank 2
Veteran
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Marco
Top achievements
Rank 2
Veteran
Share this question
or