views:

432

answers:

1

I have cascading jqGrids (State, then City, then Zipcode) on a View with multirow on. I can select one or more of the ID values for the zip code by grabbing data using the following:

var s;
s = jQuery("#zipList").jqGrid('getGridParam', 'selarrrow');

"s" ends up containing something that looks like "23,119,5932,44". I am trying to pass that string (or a collection containing those items) to a Controller action that looks something like (so I can do something to each selected zip):

public ActionResult ProcessZips(string selectedZips)
{
    // do something
}

or

public ActionResult ProcessZips(List<string> selectedZips)
{
    // do something
}
+2  A: 

It's goofy, but I'm have it working by using OnSelectRow and OnSelectAll to update a hidden field in my form with the selected ID values. I can easily grab that in the form submission using the BeginForm helper.

Gunny
I'd probably use `form.onSubmit` instead.
Craig Stuntz