New to Kendo UI for jQuery? Download free 30-day trial

Send Anti-Forgery Token with Grid Requests in ASP.NET Core and ASP.NET MVC Projects


Product Progress Kendo UI Grid
Progress Kendo UI version Created with the 2017.3.1026 version


How can I send an anti-forgery token with the requests of a Kendo UI Grid in ASP.NET Core and ASP.NET MVC projects?


To include an anti-forgery token within the requests of the Grid, add an anti-forgery token to the page which contains the Grid and send the token as a parameter by using the Transport.Data handler.

The kendo.antiforgerytokens method returns an object that contains common CSRF tokens which are found on the page.


                    .ToolBar(x => x.Excel())
                    .Columns(columns =>
                        columns.Bound(column => column.Freight);
                        columns.Bound(column => column.ShipName);
                        columns.Bound(column => column.ShipCity);
                        columns.Command(column =>
                    .Excel(excel => excel
                    .DataSource(ds => ds.Ajax()
                        .Read(r => r.Url("/Index?handler=Read").Data("forgeryToken"))
                        .Update(u => u.Url("/Index?handler=Update").Data("forgeryToken"))
                        .Create(c => c.Url("/Index?handler=Create").Data("forgeryToken"))
                        .Destroy(d => d.Url("/Index?handler=Destroy").Data("forgeryToken"))
                        .Model(m => m.Id(id => id.OrderID))

        function forgeryToken() {
            return kendo.antiForgeryTokens();
In this article
Not finding the help you need? Improve this article