free jqGrid : how to assign function return value to edit/addNew form field? -


my code is

  ......   ......   {label: 'reason'    ,name: 'reason'                          ,width: 60    ,editable: true    ,editrules : { required: true}    ,editoptions: { maxlength: 4 }    ,formoptions:{rowpos: 5, colpos: 2, label: " <a href='javascript:selectrsnrecord()' " +                            " title='see list of reason codes' > reason</a> " }                  },    ......   ...... 

when click on reason label on edit/add new form, function selectrsnrecord() gets reason value. new reason value should go reason text box on edit/add new form. can able reason value i'm not getting how show/assign value on jqgrid edit /add new form text box. following, can see new reason value on grid.

mygrid.jqgrid('setcell', selectedrowid, 'reason', newvalue); mygrid.jqgrid('getlocalrow', rowid).reason= newvalue; 

i'm using jqgrid 4.9.0 version , not possible me use other plugin.

please let me know how show/assign new reason value on jqgrid edit /add new form text box itself.

free jqgrid uses still same rule assigning ids form field old version of jqgrid do: it's name of column. can get/set value in input filed of editing dilaog using $("#reason").val. can use $("#reason").val("newvalue") in selectrsnrecord assign newvalue in form dialog.


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -