I have a number of regular MVC grids that make their requests to controllers with additional data, and they make use of the Data attribute to call a function which returns an object. For example:
@(Html.Kendo().Grid<Model>() .Name("Grid") .DataSource(dataSource => dataSource .Ajax() .ServerOperation(true) .Read(read => read .Action("ActionName", "ControllerName") .Data("FunctionName") ) )...and this works fine, but for the PivotGrid I can't seem to find a matching equivalent. The configuration seems to be quite different in fact:
@(Html.Kendo().PivotGrid<Model>() .Name("pivotGrid") .DataSource(dataSource => dataSource .Ajax() .Transport(transport => transport .Read("Action", "Controller") ) .Events(ev => ev.RequestEnd("onRequestEnd").RequestStart("onRequestStart"))I cannot seem to use the same configuration (Transport instead of Read), and I cannot find anywhere the "Data" action can be assigned. I can set this attribute to the relevant javascript function after page load using:
$("#pivotGrid").data('kendoPivotGrid').dataSource.transport.options.read.data = pivotSync;
...but I would like to be able to set this during the initial configuration of the pivot grid. Is this possible?