ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Grid add search button
Title:
B
I
{code}
?
On the following page - http://demo.aspnetawesome.com/GridNoRecordsFoundCustomLoadingDemo You demonstrate searching in two text boxes - "Search For person..." and "Search for food..." When we tried your code in our application, typing a text in either of the text boxes and then pressing "Enter" doesn't seem to do anything. Its almost as if Action("GridGetItems") function from the control doesn't fire. Can we add a Search button on the parent of the grid next to the two Search Text Boxes which upon being pressed fires public ActionResult GridGetItems(GridParams g, string person, string food) in the controller object just like .Url(Url.Action("GridGetItems"))? Also, how do we replace these text search boxes with a drop down box, where if we select an item from the Drop down, we can trigger the Action("GridGetItems") or any function in the controller object? Any help would be greatly appreciated! Thanks!
Save Changes
Cancel
Deep
asked at 13 Feb 2016
Answers
B
I
{code}
?
that demo has a different purpose, it is for showing how to make a custom loading animation mod. for searching have a look here http://demo.aspnetawesome.com/GridDemo, you have 2 textboxes and a dropdown, the search is instant (on change), but if you uncheck the "Load on parent change" checkbox a search button will appear, the search button calls $grid.data('api').load(); so if you want textboxes to search only on enter and dropdowns instantly you can listen for 'change' event on the dropdown and call the api.load
Save Changes
Cancel
Omu
answered at 13 Feb 2016
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