开发者

jqGrid dynamic event

开发者 https://www.devze.com 2022-12-24 19:03 出处:网络
Suppose I have the following (shortened for simplicity): jQuery(\"#grid\").jqGrid({ ... ondblClickRow: function() {

Suppose I have the following (shortened for simplicity):

jQuery("#grid").jqGrid({
...
ondblClickRow: function() {
    // I want to define this function dynamically at run time
}
开发者_如何学JAVA...
});

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'); });


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


Have you ever successfully used setGridParam for the subGridRowExpanded event?

jqGrid method setGridParam on event subGridRowExpanded causes error

0

精彩评论

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