Item Intervals/Group intervals On initial Load or render

2 posts, 0 answers
  1. Balaji
    Balaji avatar
    19 posts
    Member since:
    Jul 2011

    Posted 17 Aug 2011 Link to this post


    we want to set the Selection Period of the timebar based on item intervals unit ( ie. if item interval is Day then we will select one day of the last period) and if the item unit  is in month then we need to month at run time.

    So on the initial load, we are not getting the item interval count ("timebar.itemIntervals")? So in which event will i get the item or group intervals on the initial load?

    Thanks & Regards
  2. Missing user
    Missing user avatar

    Posted 23 Aug 2011 Link to this post

    Hi Balaji,

    You can get the current item interval in TimeBar.ItemIntervalChanged event via TimeBar.CurrentItemInterval property. This event will also fire on initial load, when the best current item interval is set. For example:
    public MainPage()
        timeBar1.ItemIntervalChanged += new System.EventHandler<DrillEventArgs>(timeBar1_ItemIntervalChanged);

    void timeBar1_ItemIntervalChanged(object sender, DrillEventArgs e)
        if (timeBar1.CurrentItemInterval is MonthInterval)
            timeBar1.SelectionStart = new DateTime(2011, 05, 1);
            timeBar1.SelectionEnd = new DateTime(2011, 05, 31);

    In order to get the current group interval you can use TimeBar.GroupIntervalChanged event and TimeBar.CurrentGroupInterval property.

    I hope this information helps.

    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Back to Top