views:

384

answers:

1

Suppose I have the following (shortened for simplicity):

jQuery("#grid").jqGrid({
...
ondblClickRow: function() {
    // I want to define this function dynamically at run time
}
...
});

How to I bind ondblClickRow event outside of the grid Deceleration. For example in jQuery I would normally do

$('#grid').bind('ondblClickRow', function() { alert('my over written event'); });
+2  A: 

You should be able to override event handlers with setGridParam

Something like this:

jQuery("#grid").jqGrid('setGridParam',{ 
    ondblClickRow: function() { alert('my over written event'); }
});

See docs: http://www.trirand.com/jqgridwiki/doku.php?id=wiki:methods

amir75
Excellent, thank you that works perfectly. I did see that before but I could not find it again.
Daveo
Sweet. jqgrid is awesome, nobody can deny!
amir75