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

ComboBox showing the first value

3 Answers 88 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Avi
Top achievements
Rank 1
Avi asked on 03 Jul 2008, 02:12 PM
Hi all,

I'm using a ComboBox attached to SqlDataSource.  When the page is first loaded I would like the ComboBox text to be empty.  Only after the user explicitly selects from the list it should be getting a value.

How can I change this behavior?

Avi

3 Answers, 1 is accepted

Sort by
0
Rosi
Telerik team
answered on 03 Jul 2008, 02:23 PM
Hello Avi,

You can do this by setting the AllowCustomText property of RadComboBox to true.

Regards,
Rosi
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Avi
Top achievements
Rank 1
answered on 06 Jul 2008, 06:19 AM
Thanks for the reply.

I set the AllowCustomText  property to true, but it did not to the trick.  It is still giving me the firts value...

What else can I try?

Thanks,
Avi
0
Paul
Telerik team
answered on 07 Jul 2008, 07:51 AM
Hello Avi,

Please find below a sample code snippet that shows the needed approach.

<form runat="server" id="mainForm" method="post" style="width: 100%">  
    <asp:ScriptManager ID="ScriptManager" runat="server" /> 
    <telerik:RadComboBox ID="RadComboBox1" runat="server" AllowCustomText="True" DataSourceID="SqlDataSource1" DataTextField="itemName">  
        <CollapseAnimation Duration="200" Type="OutQuint" /> 
    </telerik:RadComboBox> 
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:TestDBConnectionString3 %>" SelectCommand="SELECT [itemName] FROM [myMenuLinks]"></asp:SqlDataSource> 
</form> 

If the problem persists, I think it will be best if you can open a support ticket and send us a simple running project (incl. CSS, images, skins, DB backup if needed and so on) demonstrating the problem (and step-by-step instructions on doing so). In that way we can reproduce and pinpoint the problems you're facing on our side, understand the logic of your application and provide a solution.

Regards,
Paul
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
ComboBox
Asked by
Avi
Top achievements
Rank 1
Answers by
Rosi
Telerik team
Avi
Top achievements
Rank 1
Paul
Telerik team
Share this question
or