Reputation: 105
I am needing to have a dynamic jqgrid on my asp.net mvc3 app. The page has 10 search criteria at the top of the page to determine what will be displayed in the grid.
There are about 10-12 columns that are static that will always be in the grid. Then based on the search criteria the rest of the columns are added to the grid.
I also need to have the ability to edit/delete etc. on the data in the grid.
I don't know how to build the colModel and pass it to my view then populate the data.
I have seen examples where a model is being past in, but it doesnt show how that model is being built etc.
Does anyone have an idea on how to accomplish this?
Thanks for your help.
Upvotes: 1
Views: 1540
Reputation: 4120
I've created a html helper for ASP.NET MVC which eases the implementation of jqGrid. It should enable you to create a dynamic colmodel or at least get you started. I also created a sample app which demonstrates the html helper.
Upvotes: 2