开发者

jqgrid form editing hooks

开发者 https://www.devze.com 2023-02-25 03:05 出处:网络
Ok, so I RTFM and searched SO and google, and I can\'t seem to figure out how to add hooks so that I can add a \'loading\' icon when a user hits submit when 开发者_StackOverflow中文版adding/editing a

Ok, so I RTFM and searched SO and google, and I can't seem to figure out how to add hooks so that I can add a 'loading' icon when a user hits submit when 开发者_StackOverflow中文版adding/editing a new row from the dialog box in grid. All I need to do is know when the user clicked the submit button. Any ideas?


onclickSubmit seems to be what you need.


Figured it out:

the form events are attached to the navGrid, not the grid itself:

$("#myGrid").navGrid("#commodGrid-pager", {add:false, view:false, del:false,edit:true}
    ,{"onclickSubmit": function(){alert("ouch!");}}, /*edit options*/
    ,{} /*add options*/
    ,{} /*delete options*/
    ,{multipleSearch:false}
    ,{closeOnEscape:true} 
);
0

精彩评论

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