ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
automatically update/filter Grid when typing values in text box
Title:
B
I
{code}
?
I want to create a textbox to search for values inside a grid. When I type a text on the textbox, the grid will be updated automatically showing values coresponding to what I have typed without any need for pressing button or enter. How can I do that?
Save Changes
Cancel
minh yrrrt
asked at 12 Feb 2015
Answers
B
I
{code}
?
update: now we have a demo for this using client data: http://demo.aspnetawesome.com/GridClientDataDemo#Grid-Client-Data-Demo --- one way to do it is using .Parent to filter the grid and handle the keydown on the input to trigger event change, like this: <input type='text' id='searchtxt' class='interactive' /> @(Html.Awe().Grid("Grid1").Parent("searchtxt", "search")) <script> $('.interactive').on('keyup', function(){ $(this).change(); }); </script> without parent it can be done using [https://demo.aspnetawesome.com/GridDemo/ClientSideApi the api], but you also need to handle keydown or keyup
Save Changes
Cancel
Omu
answered at 12 Feb 2015
That works, thanks so much
at 13 Feb 2015
minh yrrrt
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK