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

Rest a combobox filter but not the selected item

1 Answer 40 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Susan Hessler
Top achievements
Rank 1
Susan Hessler asked on 06 Jul 2011, 10:54 PM
Hello,

I have a combobox with the following:
    AllowCustomText = False
    Filter = Contains
    IsCaseSensitive = False
    MarkFirstMatch = True
    OpenDropDownOnLoad = True

When I type something into the text area, the list of items shrinks to what matches what I've typed in so far.  I can then select from a smaller list the item I want.  This all works fine.

My problem is that I need to somehow erase what I typed in but not what I selected.  I need to do this so that when I click on the drop-down again, all items are shown and not only the ones that had what I typed in them.

I cannot seem to find cbox.filterExpression or cbox.currentFilterValue to reset to "".

I am using version 2010.3.1317.35.

Any help would be very appreciated!!!

Thanks,
Susan

1 Answer, 1 is accepted

Sort by
0
Dimitar Terziev
Telerik team
answered on 12 Jul 2011, 11:24 AM
Hello Susan,

In order to achieve the desired behavior you could subscribe on the client-side OnClientDropDownOpening event and use the following implementation of the event handler function:
function OnClientDropDownOpening(sender, args) {
 
           $telerik.$("li", sender.get_dropDownElement()).each(function () {
 
 
               if ($telerik.$(this).css("display") == "none") {
                   $telerik.$(this).css("display", "");
               }
           });
 
       }

All the best,
Dimitar Terziev
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
ComboBox
Asked by
Susan Hessler
Top achievements
Rank 1
Answers by
Dimitar Terziev
Telerik team
Share this question
or