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 and click the button, the click button event was not fired. I am guessing I am passing wrong parameter to the function. Below is javascript code...
$("#request").jqGrid('navButtonAdd', '#requestpager',
{ caption: "Add", buttonicon: "ui-icon-info", title: "Add", //position: "first",
onClickButton: function (ids) {
var grid = $("#request");
var rowids = grid.jqGrid('getGridParam', 'selarrrow');
var count = rowids.length;
var rowData, colData;
for (var i = 0; i < count; i++) {
rowData = $("#request").getRowData(rowids[i]);
colData = rowData.Name;
}
jQuery("#request").jqGrid({ url: "/Home/Create/" + colData });
Does anyone has any suggestion of what I am doing wrong?
See Question&Answers more detail:os