tags:

views:

216

answers:

1

Hi,

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

+2  A: 

You made a very simple error. The function navGrid has the parameter for searching before the parameter for viewing, so you should insert one more ,{} in the list of parameters of the navGrid function 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 caption and bClose parameters like you want. By the way viewGridRow function use jQuery.html method with caption and bClose parameters, which I used in the example.

Oleg
Excellent - thank you very much yet again and thx for the html info too :)
trottig