I know how to call a client-side javascript function to get parameters to pass to the the controller for the various actions of a grid. But what if I need to call a javascript function that itself takes a parameter? How to I pass a value from the grid's action, data methods to the javascript function?
Thank you in advance for your advice.
//grid setup...
.Create(update => update.Action("Add", "MyController).Data("GetParams"))
.Update(update => update.Action("Update", "MyController").Data("GetParams"))
...
function GetParams(fSomeFlag) {
var retVal;
if (fSomeFlag = true)
retVal = "someValForCreate";
else
retVal = "someValForUpdate";
return {
param1 : retVal,
param2: "someOtherValue"
};