maintaining selected item(from LoadOnDemand) on page reload

2 posts, 0 answers
  1. Ryan
    Ryan avatar
    4 posts
    Member since:
    Jan 2013

    Posted 04 Jan 2013 Link to this post

    im loading items using loadondemand(ItemsRequested) on a usercontrol ascx i also attach attributes to items


    item.Attributes.Add("onclick", "NavigateAreaSelection(" + CRMAreaID + ")")

    the problem i have is that when you select an item i navigate to a different page but would like to keep the 
    selected item selected, i try to do this on the page load of the usercontrol but i find that it doesn't have any items and will always be empty
    So How do i Maintain the selected input or populate the combobox on navigating to a different page ?

    below page load 

    If ComboAllContacts.Items.FindItemByValue(AreaHelper.GetSelectedAreaID())
    Nothing Then ComboAllContacts.SelectedValue = AreaHelper.GetSelectedAreaID()End If

  2. Kevin
    Kevin avatar
    360 posts
    Member since:
    Jul 2012

    Posted 05 Jan 2013 Link to this post

    Hello Ryan,

    When using LoadOnDemand, the items don't exist in the list until they are requested. So to add it to the list during the page load event, you will have to manually add an item to the RadComboBox, instead of trying to find and select it.

    I hope that helps.
Back to Top