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:

  1. the server code (responsible url controllername/methodname) can place http caching header. example cache-control: private, max-age=(time in seconds). force getting data during specified time interval local web browser cache.
  2. you can make ajax request controllername/methodname separately , set editoptions.value based on response instead of usage editoptions.dataurl (only if dataurl undefined value used). see the answer code example of possible implementation. way can combine call controllername/methodname main call filling grid. see the answer , this one.

by way property aysnc: true use in editoptions unknown , ignored.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -