开发者

How can I send jqgrid data by ajax post method to the server?

开发者 https://www.devze.com 2022-12-09 22:31 出处:网络
I haven\'t found how to send programatically with jquery a开发者_如何学JAVAll the rows in the jqgrid for be processed in the server.

I haven't found how to send programatically with jquery a开发者_如何学JAVAll the rows in the jqgrid for be processed in the server.

I've only found one method called getRowData(id) but it doesn't helpme because i don't have the id. that's why i want to send all the data

Any help will be appreciated.


You could use jQuery to traverse the table and get the id for each row.

tmp = [];    
jQuery("#data > tbody > tr").each(function (){
        tmp[this.id] = jQuery("#data").getRowData(this.id);
    });

My table id is 'data' in this case.


post data send to server

jQuery('#list').setPostData(data[]);

remember config jqgrid -> mtype: 'POST',

0

精彩评论

暂无评论...
验证码 换一张
取 消