I am using cell editing in jqgrid and for that, i am using many different jqgrid events, as mentioned below …
1) beforeSelectRow, 2)beforeEditCell, 3)afterEditCell, 4)onCellSelect, 5)ondblClickRow, etc…
Now, when i doubleClick on any of the row, the beforeselectRow code gets executed first.. which i want to prevent… but how to do that ??
Some example code is as below :-
ondblClickRow: function(id,irow,icol,e)
{
........
},
beforeSelectRow : function(rowid, e)
{
if(rowid==lastSelected)
{
$sampleDialog.dialog('open');
}
}
Different web browsers process the double-click event in a little different ways. So in general you can’t prevent ‘click’ event before ‘dblclick’. The callback
beforeSelectRowwill be called inside ofclickenevt handler defined inside of jqGrid code. In jQuery documentation ofdblclickevent handler you can read the following (see here):What you currently do is just not recommended way to binding both ‘click’ and ‘dblclick’ handles.
You don’t describe the original problem which you has which is probably somewhere inside of
ondblClickRowcallback implementation. The only solution will be to examine reorganization of the program to have no collisions between the actions inside ofbeforeSelectRowandondblClickRowcallbacks.