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

[Solved] default selected value other than the first

2 Answers 138 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
ibrahim
Top achievements
Rank 1
ibrahim asked on 30 May 2009, 07:38 AM
hello all i have some comboboxes in my projects that are all binded to tables from the database but by default it always gets the first item selected ..now how can i add an item that appears by  default but not selectable lets say it says please select something but i cannot select "please select something"..thanks in advance guys

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 01 Jun 2009, 10:26 AM
Hello Ibrahim,

You can set the EmptyMessage property of your RadComboBoxes to a text so that it displays when no selection is made. This property will work when you set the AllowCustomText property of the combobox. Check out the code below:
aspx:
 <telerik:RadComboBox ID="RadComboBox" EmptyMessage="Please select something" AllowCustomText="true" DataSourceID="SqlDataSource1" DataTextField="ContactTitle"  runat="server"
 </telerik:RadComboBox> 

Thanks
Princy.
0
ibrahim
Top achievements
Rank 1
answered on 01 Jun 2009, 12:43 PM
thanks princy it worked like a charm:)
Tags
ComboBox
Asked by
ibrahim
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
ibrahim
Top achievements
Rank 1
Share this question
or