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

[Solved] AllowCustomText false and still able to write text in field

3 Answers 297 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
guillaume.lebel
Top achievements
Rank 1
Iron
Iron
guillaume.lebel asked on 21 Oct 2009, 04:06 PM

Hi,

We currently have an issue with the radcombox we're still able to write text in it when the allowcustomtext is set to false.
We're simply using a normal data source to bind to the radcombobox. The load on demand isn't use in this page.

The thing is i want to keep the previous selection if there's no match in my list.

Exemple i have a list with yes and no for choice but now empty choice. If i select yes and after try to enter "k" in the combobox it'll erase my old selection and when i'll try to save my selection i'll have a null value that don't exist in my list.

Is there a way to keep the previous selected item when the value entered in the combobox doesn't match with any item present in the list?
This is my combobox declaration:

<telerik:RadComboBox ID="RadComboBox1" TabIndex="90" runat="server" Style="width: 45px;" 
 AllowCustomText="false" RadComboBoxImagePosition="Right">  
  <CollapseAnimation Duration="200" Type="OutQuint" /> 
  <ExpandAnimation Type="OutQuart" /> 
</telerik:RadComboBox> 

Thx for your time
Guillaume

3 Answers, 1 is accepted

Sort by
0
Vesko
Top achievements
Rank 2
answered on 26 Oct 2009, 10:04 AM
Try setting the MarkFirstMatch property of the combobox to True.
0
guillaume.lebel
Top achievements
Rank 1
Iron
Iron
answered on 26 Oct 2009, 05:20 PM
Hi, Thx for your answer but sadly it's not working.
0
Accepted
Veselin Vasilev
Telerik team
answered on 29 Oct 2009, 10:43 AM
Hi Guillaume,

Please check this online demo. If you leave MarkFirstMatch checked and uncheck the AllowCustomText you will get the behavior you need.

All the best,
Veselin Vasilev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
ComboBox
Asked by
guillaume.lebel
Top achievements
Rank 1
Iron
Iron
Answers by
Vesko
Top achievements
Rank 2
guillaume.lebel
Top achievements
Rank 1
Iron
Iron
Veselin Vasilev
Telerik team
Share this question
or