Rest a combobox filter but not the selected item

2 posts, 0 answers
  1. Susan Hessler
    Susan Hessler avatar
    13 posts
    Member since:
    May 2006

    Posted 06 Jul 2011 Link to this post

    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
  2. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1268 posts

    Posted 12 Jul 2011 Link to this post

    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!

Back to Top