When I am using rowSelect and sending the values of column 1 and 2 its not sending the value selected for second rowSelect ...instead only sending all the value of column 1 but not column 2 . ...
my approach:
jQuery("#viewt").click( function(){
var grid = jQuery("#inventoryInq");
var ids =grid.jqGrid('getGridParam','selarrrow');
if (ids.length>0) {
var names = [];
for (var i=0, il=ids.length; i < il; i++) {
var name = grid.jqGrid('getCell', ids[i], 'sku');
names.push(name);
}
$.ajax({
type: "POST",
url: "/cpsb/transactionHistory.do",
data:{
method:"getTransactionHistory",
lpn:JSON.stringify(ids),
sku:JSON.stringify(name)
},
dataType: "json",
success: function(msg){
alert(msg);
}
});
}
});
I have set key=true for column 1 .
update:1
jQuery("form#viewform").submit( function(){
var grid = jQuery("#inventoryInq");
var id =grid.jqGrid('getGridParam','selrow');
if (id) {
var ret = grid.jqGrid('getRowData',id);
}
url:"/cpsb/transactionHistory.do?method=getTransactionHistory&lpn="+ret.licensePlateNumber+"&sku="+ret.sku;
});