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

How to set SelectedValue with url parameter value

1 Answer 113 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Edwin
Top achievements
Rank 1
Edwin asked on 10 Feb 2011, 12:40 PM
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.

1 Answer, 1 is accepted

Sort by
0
Kalina
Telerik team
answered on 10 Feb 2011, 10:11 PM
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.
Tags
ComboBox
Asked by
Edwin
Top achievements
Rank 1
Answers by
Kalina
Telerik team
Share this question
or