As I did below, it would be nice for the jqgrid to provide similar functionality (getting target row on the destination grid)
//pageX, pageY from jquery event
var getRowFromOffSet = function ($grid, pageX, pageY) {
var trs = $grid.find('tr');
for (var i = 0; i < trs.length; i++) {
var $tr = $(trs);
var left = $tr.offset().left;
var top = $tr.offset().top;
var bottom = top + $tr.height();
var right = left + $tr.width();
if (left <= pageX
&& top <= pageY
&& bottom >= pageY
&& right >= pageX)
{
return $tr;
}
}
return null;
}
All the best.
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top