jqGrid拖放接收事件 [英] jqGrid drag and drop Receive event

查看:88
本文介绍了jqGrid拖放接收事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用jqgrid拖放,我有两个表TABLE A和TABLE B,我从TABLE A拖了一行,然后放入TABLE B,我想捕获新的行ID和表中接收到的数据,是否在那里jqGrid中有任何接收事件吗?

I am using jqgrid drag and drop , i have two tables TABLE A and TABLE B, i am draging one row from TABLE A and Droping into TABLE B, i Want to capture new row id and data received in table, is there any receive event in jqGrid ?

推荐答案

您可以定义ondrop事件函数(请参见此

You can define ondrop event function (see this Link ) like following

jQuery("#table2").jqGrid('gridDnD', {
    ondrop: function (ev, ui, getdata) {
        // var acceptId = $(ui.draggable).attr("id");
        // getdata is the data from $('#table1').jqGrid('getRowData',acceptId);
        // so you have full information about dropped row
    }
});

ondrop参数的内部

,您将找到所需的所有信息.

inside of ondrop's parameters you will find all information which you need.

这篇关于jqGrid拖放接收事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆