开发者

is it possible to bind JQGrid OnSelectRow using Live?

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

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜