Hi!
I have a serverbound (ajax) grid and want to add a custom argument when fetching data.
After some searching I found the option to alter the parameterMap function. However, when I try to extend that function I extend the original functionality, not the one provided by kendo.aspnetmvc.js. This means that my custom argument works, but sort/filter/... does not anymore. When I remove my code sort/filter/... works but of course my custom data does not get through.
Is there any way to add my custom argument? Below is the code I tried for reference:
Thanks
/Victor
I have a serverbound (ajax) grid and want to add a custom argument when fetching data.
After some searching I found the option to alter the parameterMap function. However, when I try to extend that function I extend the original functionality, not the one provided by kendo.aspnetmvc.js. This means that my custom argument works, but sort/filter/... does not anymore. When I remove my code sort/filter/... works but of course my custom data does not get through.
Is there any way to add my custom argument? Below is the code I tried for reference:
$(
"#myGrid"
).data(
"kendoGrid"
)
.dataSource.transport.parameterMap =
function
(data, operation) {
return
$.extend(data, {
myCustomData:
true
//Actually client-side calculated data, not static
});
};
Thanks
/Victor