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

Do not allow user to type custom text

4 Answers 551 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Az
Top achievements
Rank 1
Az asked on 18 Sep 2012, 12:35 PM
<telerik:RadComboBox ID="ddlMyCombo" DataTextField="dev" DataValueField="devid" AllowCustomText="false"
                                                    runat="server" Filter="StartsWith" ExpandDirection="Down" />


user should not be able to type in custom text in the ComboBox. I set the allowcustomtext property to false but it did not work.
when user types in custom text and the form is saved, the combobox selected value is -1.

please help with a solution to this.

4 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 19 Sep 2012, 04:16 AM
Hi Az,

With reference to this thread the MarkFirstMatch functionality does not mark the matches when the Filter functionality is enabled. Moreover, when the Filter functionality is enabled the users are allowed to type in the RadComboBox input area regardless the value set to the AllowCustomText property.

Hope this helps.

Regards,
Princy.
0
Az
Top achievements
Rank 1
answered on 19 Sep 2012, 05:57 AM
Thanks Princy,

Any work around to resolve this issue?
my application throws exception/ crashes when saved
scenario: the user enters invalid input/ enters keys that do not match any items from the comboBox.
the user saves. this crashes the application.

please help
0
Kalina
Telerik team
answered on 19 Sep 2012, 04:42 PM
Hi Az,

Please take a look at the "Select only an existing item" help article.

Regards,
Kalina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Az
Top achievements
Rank 1
answered on 19 Oct 2012, 10:46 AM
Hi,
Setting AllowCustom text = false
and removing 
Filter= "startswith" solved the problem


Thanks.
Tags
ComboBox
Asked by
Az
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Az
Top achievements
Rank 1
Kalina
Telerik team
Share this question
or