Jqgrid inline edit for selectList hits server for each row -
i have set , editoptions: { aysnc: true, dataurl: 'controllername/methodname?__sessionkey=' + sessionkey + "&id=" + id, buildselect: buildselectfromjson, style: "width: calc(100% - 65px);", dataevents: [ { type: 'change', fn: function (e) {} } ] } in buildselectfromjson returns select list in html. now dataurl hits server each row select list same rows. how can restrict single hit , use select list other rows?
i can suggest 2 alternatives:
- the server code (responsible url
controllername/methodname) can place http caching header. examplecache-control: private, max-age=(time in seconds). force getting data during specified time interval local web browser cache. - you can make ajax request
controllername/methodnameseparately , seteditoptions.valuebased on response instead of usageeditoptions.dataurl(only ifdataurlundefinedvalueused). see the answer code example of possible implementation. way can combine callcontrollername/methodnamemain call filling grid. see the answer , this one.
by way property aysnc: true use in editoptions unknown , ignored.
Comments
Post a Comment