Initially Select Right-Most Value

3 posts, 0 answers
  1. Ryan
    Ryan avatar
    61 posts
    Member since:
    Jul 2009

    Posted 24 Feb 2010 Link to this post

    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. Tsvetie
    Tsvetie avatar
    1517 posts

    Posted 26 Feb 2010 Link to this post

    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,
    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.
  3. DevCraft R3 2016 release webinar banner
  4. Ryan
    Ryan avatar
    61 posts
    Member since:
    Jul 2009

    Posted 01 Mar 2010 Link to this post

    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.
Back to Top