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

Is it possible to host non-sparkline content in the TimeBar thumb?

3 Answers 97 Views
TimeBar
This is a migrated thread and some comments may be shown as answers.
Bhupendra
Top achievements
Rank 1
Bhupendra asked on 04 Oct 2011, 10:13 PM
I want to use timebar control for displaying events. To achieve that, I am trying to create my custom control to be hosted inside timebar thumb.
I am not sure how should I handle the zoom changes and how can I synchronize my custom control layout with the timeslots of the timebar in most efficient manner given that, zoom and scrolling are frequent and non-performant operations could be real performance issue.

My requirements are very much like Telerik SchedulerView in Timeline mode. But, I also want zooming feature of timebar control and also, timebar control best suites interms of look and feel for this type of requirement.

Any pointers or alternative approaches will be of great help.

Thanks,

3 Answers, 1 is accepted

Sort by
0
Tsvetie
Telerik team
answered on 10 Oct 2011, 08:38 AM
Hi Bhupendra,
In short - yes, it is possible to add your custom control as content for the time bar control. Basically, you can add any kind of control as content for the time bar control.

Regarding your question, about synchronizing your control with the time intervals - this will happen automatically, in case the time period that your custom control covers is the same as the time period of the time bar control. When the user zooms in, the time bar expands the width, available for its content and thus, the content stretches as well.

Regards,
Tsvetie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
David
Top achievements
Rank 1
answered on 04 Apr 2013, 10:00 PM
Hi, 

So I ran into this issue with a custom control as the content in the TimeBar.  I looked at the source for the RadTimeBar control and the magic for syncronizing child content for the RadSparkline control is precisely what is needed for custom controls.  The problem is that the child content control is synced by way of the ISupportsDateTimeVirtualization interface which Telerik has marked as internal.  If this interface were marked public I could implement that interface in my custom control and my periods would be synced just like the Sparklines control gets synced.

Is there any chance Telerik can mark the ISupportsDateTimeVirtualization interface as public so we can create better synced custom content for the TimeBar control?

Thanks,
David Sandor
0
Tsvetie
Telerik team
answered on 09 Apr 2013, 08:49 AM
Hello David Sandor,

The ISupportsDateTimeVirtualization interface was introduced with data virtualization for RadSparkline, when used in RadTimeBar. You do not need to implement this interface in order to ensure the correct position of the elements of a custom control according to the timeline of RadTimeBar. As I mentioned before, you need to make sure that the period that your custom control visualizes is the same as the period, specified with the PeriodStart and PeriodEnd properties of the timeBar instance. That is, the minimum for your custom control should be timeBar.PeriodStart and the maximum should be timeBar.PeriodEnd. In case you need additional help with that, please open a new support ticket and send me a simple running project, demonstrating the integration of your custom control and RadTimeBar and I will help you with the correct setup.

On the other hand, in case you want to implement data virtualization, indeed the  ISupportsDateTimeVirtualization interface will help you with this task. We will consider making this interface public, having such cased in mind.

Kind regards,
Tsvetie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
TimeBar
Asked by
Bhupendra
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
David
Top achievements
Rank 1
Share this question
or