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

Initially Select Right-Most Value

2 Answers 26 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 24 Feb 2010, 04:06 PM
I have a slider that contains a collection of fiscal years, and I want the right-most fiscal year to be selected by default.  I was able to accomplish this in the past by populating hte slider's items in it's Init event handler, and setting its value equal to to its (Items.Count - 1).

In this scenario, however, I cannot populate the slider's items until its Load event handler, because its items depend on another control's SelectedValue, which doesn't equal anything when the any control (or even the page itself) is being initialized.

I've tried playing with Session Variables in order to determine when the slider is being initialized vs. loaded, but to no avail.  Does anybody have any suggestions?  Thanks!

 

2 Answers, 1 is accepted

Sort by
0
Tsvetie
Telerik team
answered on 26 Feb 2010, 03:21 PM
Hi Ryan,
I am not quite sure I understand the problem you have correctly. You should not have problems setting the Value property of the slider control in the handler for its load event, right after you populate its items collection.

In case I misunderstood the problem you have or in case you need additional help, please open a new support ticket and send me a running project that demonstrates the problem as well as detailed information on the problem itself.

All the best,
Tsvetie
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Ryan
Top achievements
Rank 1
answered on 01 Mar 2010, 08:37 PM
Thank you for your reply.  I was actually able to solve the problem.  Now I populate the slider on Page_Load if the dependant dropdownlist does, in fact, have a selected value.  Because my slider, now, doesn't hold a selected value until Page_Load, all other controls that are dependant on the slider's value have to be populated in Page_PreRender.

All is well.
Tags
Slider
Asked by
Ryan
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
Ryan
Top achievements
Rank 1
Share this question
or