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

filtering "on the fly"

3 Answers 66 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Łukasz Kuryło
Top achievements
Rank 1
Łukasz Kuryło asked on 04 Jun 2010, 11:28 AM
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?

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 04 Jun 2010, 01:37 PM
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.
0
Debajyoti
Top achievements
Rank 2
answered on 09 Jul 2013, 01:00 PM
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
0
Viktor Tachev
Telerik team
answered on 11 Jul 2013, 08:16 PM
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.
Tags
Grid
Asked by
Łukasz Kuryło
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Debajyoti
Top achievements
Rank 2
Viktor Tachev
Telerik team
Share this question
or