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

Set RadComboBox Initial Value using WebService OnDemand

1 Answer 62 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
B
Top achievements
Rank 1
B asked on 01 Dec 2010, 10:11 PM

I'm trying to use the RadComboBox with asp.net ajax webservice in ondemand mode.  If a client edits a record, i need to open an asp.net form in "edit" mode and display the current selected values.  How do i set the value and text on the RadComboBox?  The text part is easy, but the value property on the control is read only.

I'd preferably like to set the initial value like the code below.  Is this possible?

Entity e = db.lookupCustomerByID(100);
if(e != null)
{
RadComboBox1.Text = e.LastName;
RadComboBox1.Value = e.CutomerID;
}

1 Answer, 1 is accepted

Sort by
0
B
Top achievements
Rank 1
answered on 01 Dec 2010, 11:30 PM
never mind.  it appears the following will work.  I originally didn't try it because the tooltip for SelectedValue made it sound like it is read only.

RadComboBox1.SelectedValue = e.CustomerID;
Tags
ComboBox
Asked by
B
Top achievements
Rank 1
Answers by
B
Top achievements
Rank 1
Share this question
or