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

Setting Combo To Retrieved Value

2 Answers 31 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Thomas Derenthal
Top achievements
Rank 1
Thomas Derenthal asked on 23 May 2011, 09:09 PM
I have an object/property called User.JobPosition where the JobPosition is a string.

I have a ComboBox that is bound to a sql datasource with AppendDataBoundItems set to True that selects from a lookup table of JobPositions.

Ho do I get the ComboBox to display the User.JobPosition. I have tried this and this:
ddlPosition.FindItemByValue(User.JobPosition.ToString))
ddlPosition.Items.Insert(0, New ListItem(User.JobPosition.ToString, User.JobPosition.ToString))
Neither of which work, whereas the native .NET dropDownList will allow something similar.

2 Answers, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 26 May 2011, 04:01 PM
Hello Thomas,

Please take a look at the followinh help article and let me know if this is of any help to your scenario. It explains how you can insert an item to the RadComboBox control.

All the best,
Kate
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.

0
Thomas Derenthal
Top achievements
Rank 1
answered on 26 May 2011, 07:01 PM
Thank you this is exactly what I needed.
Tags
ComboBox
Asked by
Thomas Derenthal
Top achievements
Rank 1
Answers by
Kate
Telerik team
Thomas Derenthal
Top achievements
Rank 1
Share this question
or