views:

291

answers:

2

I'd like to use the multisearch facility from JqGrid within an ASP.NET MVC application. When setting up the grid you set a URL that becomes the action method on a controller. But how do I find out what the parameters should be defined for the action method. I've seen in another post that working out what the parameters should be is the hardest bit, but they didn't explain how you do it.

Can anyone advise please.

Thanks, Simon

A: 

Since you (theoretically, anyway) have no idea what the keys will be, I'd just parse the Request.Query collection.

Craig Stuntz
Thanks Craig, FYI the query string collection contains the following:page, rows, _search, sidx, sord, nd, filtersAs far as search/filtering goes the interesting items are _search which is true or false indicating whether the user has initiated a search/filter and filters which appears to be a JSON object containing the search/filter criteria that needs to be parsed to filter the data.
Simon Lomax
OK, it's changed since the last version, then. The filters used to be separate arguments. In that case you probably can/should use named arguments.
Craig Stuntz
Yes I will, have you any idea what the nd parameter is, it appears to be an integer but what does it indicate?
Simon Lomax
A: 

Not sure if you still need an answer, but I'd give this a read: http://www.codeproject.com/KB/aspnet/AspNetMVCandJqGrid.aspx

Dan