TimeBar regression

4 posts, 0 answers
  1. Michael
    Michael avatar
    24 posts
    Member since:
    Sep 2010

    Posted 05 Dec 2011 Link to this post

    Using the Q3 release, setting the Selection/Visible/Period Start and End dates on the TimeBar via two-way data binding is no longer working.  It works exactly once before it begins showing incorrect values.  This was supposedly fixed in a nightly build a while ago and has been regressed upon release.

    The test case is simple: create a TimeBar that is bound via two-way binding to some data source.  Set each of the properties in the data source in the following order (all timestamps include a 12:00 AM time portion):
    0) Create a TimeBar bound to a null ObservableCollection.  Initial values are as follows:
    SelectionStart = 11/22/2011
    SelectionEnd = 12/16/2011
    VisiblePeriodStart = 11/20/2011
    VisiblePeriodEnd = 12/18/2011
    PeriodStart = 11/18/2011
    PeriodEnd = 12/20/2011

    1)  (Works as expected -- no change from initial state)
    SelectionStart = 11/22/2011
    SelectionEnd = 12/16/2011
    VisiblePeriodStart = 11/20/2011
    VisiblePeriodEnd = 12/18/2011
    PeriodStart = 11/18/2011
    PeriodEnd = 12/20/2011

    2)  (Works as expected)
    SelectionStart = 12/2/2011
    SelectionEnd = 12/8/2011
    VisiblePeriodStart = 11/30/2011
    VisiblePeriodEnd = 12/10/2011
    PeriodStart = 11/28/2011
    PeriodEnd = 12/12/2011

    3) (TimeBar does not update as expected)
    SelectionStart = 11/26/2011 (TimeBar shows 11/28/2011)
    SelectionEnd = 12/8/2011
    VisiblePeriodStart = 11/24/2011 (TimeBar shows 11/28/2011)
    VisiblePeriodEnd = 12/10/2011
    PeriodStart = 11/22/2011
    PeriodEnd = 12/12/2011

    4)  (TimeBar does not update as expected)
    SelectionStart = 11/26/2011 (TimeBar shows 11/28/2011)
    SelectionEnd = 12/15/2011 (TimeBar shows 12/12/2011)
    VisiblePeriodStart = 11/24/2011 (TimeBar shows 11/28/2011)
    VisiblePeriodEnd = 12/17/2011 (TimeBar shows 12/12/2011)
    PeriodStart = 11/22/2011
    PeriodEnd = 12/19/2011

    At no point is the TimeBar provided with data.  I'm simply changing the bounding properties and it's failing miserably.
  2. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 07 Dec 2011 Link to this post

    Hi Michael,
    Indeed, we fixed a couple of problems with the two-way binding of the period properties of RadTimeBar. However, I am afraid you have misinterpreted the problems that we have fixed. In case you point me to the resource, from which you found out about the fix, I will be able to provide you with additional information on the fix itself.

    Currently, there is a correct order, in which the properties of the timebar should be set. This is a result of the fact that the values are coerced against each other. In short, you need to change the order of setting properties in your code:

    PeriodStart = 11/22/2011
    PeriodEnd = 12/12/2011
    VisiblePeriodStart = 11/24/2011
    VisiblePeriodEnd = 12/10/2011
    SelectionStart = 11/26/2011
    SelectionEnd = 12/8/2011

    I have attached my test page for your reference as well.

    All the best,
    Tsvetie
    the Telerik team

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

  3. DevCraft banner
  4. Michael
    Michael avatar
    24 posts
    Member since:
    Sep 2010

    Posted 07 Dec 2011 Link to this post

    Tsvetie, thank you for that piece of information.  I was previously aware of the precedence order with the TimeBar, but I was not aware it applied to the updating of properties within code as well as the ordering within XAML.  I've updated my code as you suggested and the TimeBar now works as I expect.   However, I'd recommend updating the documentation page which you linked so it's a little clearer: it was not at all apparent to me that I had to follow the precedence order when updating my bindings.  It's possible to read that documentation page as "your XAML must look like this" and overlook the fact that the precedence order applies to binding updates as well.

    Thank you again for the assistance.
  5. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 08 Dec 2011 Link to this post

    Hi Michael,
    Thank you for your feedback. I will forward it to the responsible people.

    Kind regards,
    Tsvetie
    the Telerik team

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

Back to Top