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 which buildSelectFromJson returns select list in html.
Now dataurl hits server for each row but my select list is same for all rows. so how can i restrict to a single hit and then use that select list for all other rows?
I can suggest you two alternatives:
ControllerName/MethodName) can place HTTP caching header. For exampleCache-Control: private, max-age=(time in seconds). It will force getting the data during specified time interval from the local web browser cache.ControllerName/MethodNameseparately and seteditoptions.valuebased on the response instead of usageeditoptions.dataUrl(only ifdataUrlis undefined thevaluewill be used). See the answer for the code example of the possible implementation. By the way you can combine the call toControllerName/MethodNamewith the main call for filling the grid. See the answer and this one.By the way the property
aysnc: truewhich you use ineditoptionsis unknown and it will be ignored.