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

TimeBar regression

3 Answers 67 Views
TimeBar
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 06 Dec 2011, 01:45 AM
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.

3 Answers, 1 is accepted

Sort by
0
Tsvetie
Telerik team
answered on 07 Dec 2011, 03:50 PM
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 >>

0
Michael
Top achievements
Rank 1
answered on 07 Dec 2011, 04:39 PM
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.
0
Tsvetie
Telerik team
answered on 08 Dec 2011, 10:40 AM
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 >>

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