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

[Solved] Empty combobox

3 Answers 131 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Patrick Wilson
Top achievements
Rank 1
Patrick Wilson asked on 07 Oct 2009, 03:46 PM
I have a combobox that is populated by a sqldatasource. I would like for the combobox to show..."Please select an item" or just have it blank, when the page loads. How do i accomplish this?

3 Answers, 1 is accepted

Sort by
0
Accepted
Schlurk
Top achievements
Rank 2
answered on 07 Oct 2009, 05:45 PM
If you set the AllowCustomText property to true and the AppendDataBoundItems property to true as well you can get this behavior. This is how I implemented it:

<telerik:RadComboBox ID="RadComboBox1" runat="server"  
            DataSourceID="SqlDataSource1" AppendDataBoundItems="true"  
            AllowCustomText="true" EmptyMessage="Please Select an Item"  
            DataTextField="ProductName" DataValueField="ProductName"
</telerik:RadComboBox> 

0
Patrick Wilson
Top achievements
Rank 1
answered on 07 Oct 2009, 06:31 PM
Schlurk,
thansk for the help.

Are there any good articles or do you have any guidence on putting a combo box into the insert mode of a radgrid?

Pwilson

0
Schlurk
Top achievements
Rank 2
answered on 07 Oct 2009, 07:28 PM
You are quite welcome.

As for having a combobox in a edit column of a grid I would suggest looking into this documentation article discussing column types (along with anything else you find relevant to your implementation in the documentation) as well as this grid demo.
Tags
ComboBox
Asked by
Patrick Wilson
Top achievements
Rank 1
Answers by
Schlurk
Top achievements
Rank 2
Patrick Wilson
Top achievements
Rank 1
Share this question
or