jquery - How to send only two column values from jqgrid? -


i have jqgrid , on button click want send 2 column values instead of sending whole values...how can achieve using getrowdata ....any suggestion appreciated.. thanks!

probably method getcol can halt mostly. if 1 columns want send column id (key:true) can receive data need 1 call:

var mydata = $('#list').jqgrid('getcol', 'column name 1', true); 

if no columns has key:true in column definition should make 2 calls:

var mydata1 = $('#list').jqgrid('getcol', 'column name 1'); var mydata2 = $('#list').jqgrid('getcol', 'column name 2'); 

then can combine data or set there separate 2 parameters:

$.ajax({     type: "post",     url: "/cpsb/internalorderlist.do",     data : {         jggriddata1: json.stringify(mydata1),         jggriddata2: json.stringify(mydata2)     },     datatype:"json",     contenttype: "application/json; charset=utf-8",     success: function(response, textstatus, xhr) {         alert("success");     },     error: function(xhr, textstatus, errorthrown) {         alert("error");     } }); 

Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -