Add an event handler to jqGrid after instantiation

后端 未结 1 1313
野性不改
野性不改 2020-12-03 11:46

I want to add an event handler to jqGrid (for the onSelectRow event) but after the grid has already been created on the page i.e. I cant hardcode it into the initial jqGrid

相关标签:
1条回答
  • 2020-12-03 12:00

    I just tested to use

    $('#list').jqGrid('setGridParam', { onSelectRow: function(id){ alert(id); } } );
    

    in my code and it works. If jqGrid has already an onSelectRow it overwrite the old one event handle. If there are no onSelectRow event handler, it add a new handler. So all must work.

    If you do will have problem, you should post a code example which reproduce it.

    0 讨论(0)
提交回复
热议问题