I am using the RadComboBox with "Contains" filter. The filter does not work properly when clearing the text and selection in the client side script.
C# code:
_comboBox.Filter = RadComboBoxFilter.Contains;
if (_comboBox.EnableLoadOnDemand && !AllowCustomText && !_comboBox.CheckBoxes)
{
if (String.IsNullOrEmpty(_comboBox.OnClientBlur))
{
_comboBox.OnClientBlur = "function (sender, eventArgs) { var textInTheCombo = sender.get_text(); var item = sender.findItemByText(textInTheCombo); if(!item) { sender.set_text(''); sender.clearSelection(); } }";
}
}
Out intent for OnClientBlur is to clear the user input when it losts the focus and there is not a match item. It does clear the text/selection, and show the EmptyMessage, but when it get the focus again, the combobox still show the filtered items which was filtered by the previous input.
For example, the combobox has 20 items total. When user inputs a filter and 3 (out of 20) of the items which contains the input characters will show. When user click off the combobox, it clear the text as expected (as none of the items match the input exactly). But when user clicks the combobox again, it still only show the 3 items (instead of the 20 items which is supposed to have as at the moment the text is empty).
Any suggestions to fix the problem I am getting. Thanks a lot.
Regards,
Kevin Hu