I have a customize Read function for kendo grid ....
public virtual async Task<ActionResult> Read([DataSourceRequest] DataSourceRequest request,
RecordStatus? recoredStatus){ // code here }
now I want refresh my grid by using record status in kendo with jquery
<script type="text/javascript">
function viewButtonClickHandler(e) {
alert(e.Id)
$('#Grid').data('kendoGrid').dataSource.read(e.Id);
$('#Grid').data('kendoGrid').refresh();
}
but how I send this additional parameter ( recordStatus )in read function !? can I do this !?
So if you are using Kendo MVC UI you can use the Data property for the Read method of DataSource . So the client side method DataHandlerName will execute while you are requesting for the read action, by using-
You can easily handle the client side script. Your Server Side code will be following for Kendo GRID,
And your client side code will be-
And Your Action Mehtod will be,
If I understood correctly you just need this. And also please take a look to the link. It may can helps you.
}
http://www.telerik.com/forums/how-to-refresh-a-grid-with-parameters-dc0f416ce08a
Using Purely java script this is how you can send params to read method
On Server Side you need this.
If you are using MVC based grid telerik forum already has example on how to do use read to send extra parameters .
http://www.telerik.com/forums/pass-additional-parameters-to-read-ajax-datasource-method---mvc