I am trying to use multiselect functionality in jqgrid to select multiple rows and pass it to the controller. I have created a button as follows but when I select the rows a
well its not difficult to implement multiselect in jqgrid, I'll give you a working example which i'd implemented in my project.
HTML
//your grid
//pager
//button which will take the data of all multiselect rows to controller
in your JqGrid just enable multiselect: true
and write this javascript function
$('#sendMe').click(function(){
var selRowIds = $('#grid').jqGrid('getGridParam', 'selarrrow');
if(selRowIds.length>0)
{
for( var i=0;i
and you controller method will lok like this
[HttpPost]
public ActionResult AddMe(int? Id, string Name, string Company)
{
}
I hope this helps, its a working example...
P.S- please mark it as answer if it helped you.
讨论(0)