How to set SelectedValue with url parameter value

2 posts, 0 answers
  1. Edwin
    Edwin avatar
    2 posts
    Member since:
    Feb 2011

    Posted 10 Feb 2011 Link to this post

    I need to set RadComboBox SelectedValue property with URL parameter value:

    ComboBox OnLoad event:
    someComboBox.DataSource = GetDataList();
    someComboBox.DataBind();

    ComboBox OnDataBound event:
    someComboBox.ClearSelection();
    someComboBox.Text = string.Empty;
    someComboBox.SelectedValue = valueFromUrlParameter;

    After page loads ComboBox is populated with data from GetDataList(), but selected value is first item in the list. It is intersting if i step through these methods in debugging mode, then value is correctly selected.
  2. Kalina
    Admin
    Kalina avatar
    918 posts

    Posted 10 Feb 2011 Link to this post

    Hello Edwin,

    Please take a look at this forum thread where your question has been already answered.

    Best wishes,
    Kalina
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Back to Top