robinvanderknaap / MvcJqGrid

Fluent jqGrid Html Helper for ASP.NET MVC
www.playground.webpirates.nl/mvcjqgrid
GNU Lesser General Public License v3.0
101 stars 74 forks source link

Keep selected state checkboxes after postback #10

Open robinvanderknaap opened 12 years ago

robinvanderknaap commented 12 years ago

Hi Robin,

I began to use your very helpful MvcJqGrid and I wonder about how can we automatically re-checked all checkbox user has already checked before the post back ?

I retain the information into a database table to know which clients the user checked.

Best regards, David Létourneau

robinvanderknaap commented 12 years ago

Hi David,

MvcJqgrid doesn't contain a out-of-the-box method for this scenario at this moment.However it's not difficult to implement when you know a little javascript. You can find some pointers here: http://stackoverflow.com/questions/8172186/jqgrid-saving-checkbox-selected-state All the events you need are supported by mvcjqgrid.

Maybe I'll make this a feature in the next release of mvcjqgrid, I like the idea.

Regards, Robin