I'm using MVC 2 and loading a partial view via AJAX which contains my jqGrid. The problem is that my OnSelectRow event only fires once if I have it in an external .js file. Is it possible to use the jQuery live to bind to the OnSelectRow? I开发者_运维知识库 can only see how to bind the OnSelectRow in the options for the jqGrid?
Thanks for the help, Ciaran
It seems to me you will find the answer on your question in Add an event handler to jqGrid after instantiation. Live binding is nothing more as the usage of setGridParam
method with onSelectRow
event handle.
I resolved this issue in the end by using the following:
$('#gridTable').jqGrid({
...
, onSelectRow: function (id) { MyMethod(Param1,Param2,id); }
... })
The problem was I wasn't passing the parameters into my method correctly. The above worked for me.
Ciaran
精彩评论