i am trying to manually override the value for caption and bClose for the modal “View Record” Dialog but am unable to do so?
I am calling it with
jQuery("#list2″).jqGrid('navGrid','#pager2', {
view:true,
deltext:dt,
deltitle:delt,
viewtext:vt,
viewtitle:vddt,
}, //options
{
//removed
}
, // edit options
{
//removed
}, // add options
{
//removed
}, // del options
{
// height:250,
jqModal:true,
caption:view_dialog_caption,
bClose:view_dialog_close,
closeOnEscape:true
} // view options
)
where view_dialog_caption and view_dialog_close are set to custom values.
Those are set ok (checked in firebug) but p.caption in grid.formedit.js is empty (b/c p is empty here “viewGridRow : function(rowid, p){“) – but why?
Any ideas why viewGridRow might not get the object from my pager definition?
I am able to set the apropriate values for add/edit etc…
Does s.o. have an working example maybe ?
Thanks,
regards,
Thomas
You made a very simple error. The function
navGridhas the parameter for searching before the parameter for viewing, so you should insert one more,{}in the list of parameters of thenavGridfunction before the parameter with the options of the “View Record” Dialog.I modified an answer to another question and posted it to http://www.ok-soft-gmbh.com/jqGrid/ClientsideEditing2.htm to demonstrate usage of
captionandbCloseparameters like you want. By the wayviewGridRowfunction usejQuery.htmlmethod withcaptionandbCloseparameters, which I used in the example.