Reputation: 73
I'm building a simple mvc3 app using jqgrid. My form currently calls a function in my controller that searches the database based on what the user has inputted into the textboxes after clicking on a search button. I want to only display the jqgrid with the information after clicking on the search button. Any idea on how to do this? Thanks
Upvotes: 0
Views: 450
Reputation: 73
You need to pass an additional variable to the controller to check whether you have selected a button or not.
example:
('#grid').jqgrid({
...
url: '/Controller/Action/?additionalvariable = ' + variable,
...
)};
where the value of the variable is true or false depending on whether you have searched or not.
Upvotes: 1