Hi,
We have a combobox with search capabilities via the IsEditable property. However, we need to enforce the rule that the combobox-textbox can not contain values that are not in the combobox list of existing values. Is there an easy way to do it or do we need to add plumbing code to do so.
TW
We have a combobox with search capabilities via the IsEditable property. However, we need to enforce the rule that the combobox-textbox can not contain values that are not in the combobox list of existing values. Is there an easy way to do it or do we need to add plumbing code to do so.
TW
5 Answers, 1 is accepted
0
Hello,
You could set the IsReadOnly property to True - that will disable typing and selecting items which are not in the ItemsSource of the ComboBox.
All the best,
Konstantina
the Telerik team
You could set the IsReadOnly property to True - that will disable typing and selecting items which are not in the ItemsSource of the ComboBox.
All the best,
Konstantina
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Tony
Top achievements
Rank 1
answered on 12 Apr 2012, 01:50 PM
Hi Konstantina,
The customer doesn't want to disable typing, but they just don't want to endup with a text that is not in the combobox list of values. They also want to see the resulting text as they're typing of course. It's a very hard requirement as far as UI behavior is concern.
TW
The customer doesn't want to disable typing, but they just don't want to endup with a text that is not in the combobox list of values. They also want to see the resulting text as they're typing of course. It's a very hard requirement as far as UI behavior is concern.
TW
0
Hi Tony,
In this case I would suggest to validate the Text of the ComboBox as demonstrated in the following example:
http://demos.telerik.com/silverlight/#ComboBox/Validation
Kind regards,
Yana
the Telerik team
In this case I would suggest to validate the Text of the ComboBox as demonstrated in the following example:
http://demos.telerik.com/silverlight/#ComboBox/Validation
Kind regards,
Yana
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Tony
Top achievements
Rank 1
answered on 17 Apr 2012, 02:21 PM
Hi Yana,
We're already using the validation in our controls. However, the users still wants to completely limit the resulting text to only the ones in the combobox.
TW
We're already using the validation in our controls. However, the users still wants to completely limit the resulting text to only the ones in the combobox.
TW
0
Accepted
Hello Tony,
There is not built-in functionality in RadComboBox which you can use to achieve this requirement. However, you can try to subscribe to KeyDown event of the control and check the entered text in its handler.
Hope this helps.
Greetings,
Yana
the Telerik team
There is not built-in functionality in RadComboBox which you can use to achieve this requirement. However, you can try to subscribe to KeyDown event of the control and check the entered text in its handler.
Hope this helps.
Greetings,
Yana
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>