filtering "on the fly"

4 posts, 0 answers
  1. Łukasz Kuryło
    Łukasz Kuryło avatar
    24 posts
    Member since:
    Jan 2010

    Posted 04 Jun 2010 Link to this post

    Hi.
    I have radgrid with template column and enabled filtering for this column with ShowFilterIcon="false" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true"
    When I write sth in the filter field and press enter it works ok. Now I want sth like that. When I write something in this field, after 500ms I want to send it without clicking on the enter. How can I do that?
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 04 Jun 2010 Link to this post

    Hello,

    I guess you can achieve this by trying the approach:

    Access the textbox in ItemCreated event and attach OnKeyPress event to textbox. Pass the textbox client object and to event handler by passing 'this' as parameter. Now in the event handler, check for the length of the textbox text and invoke the filter command accordingly after a timeout (use setTimeOut() method for that).

    You could get more information on filter command from here.

    Regards,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Debajyoti
    Debajyoti avatar
    7 posts
    Member since:
    Nov 2011

    Posted 09 Jul 2013 Link to this post

    can you please prepare a sample code and share with us. we are just learning the usage of rad grid and totally lost to bring this functionality.

    Thanks very much
  5. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 11 Jul 2013 Link to this post

    Hi,

    You could implement a search for the RadGrid on key press by following the instructions in this article. Also you could find similar approach illustrated in a code library located here.

    Follow the illustrated approach and you should be able to achieve the desired result.

    Regards,
    Viktor Tachev
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top