Hello!
I'd like to add an AntiForgeryToken to the filter chagne request, my code look like this:
Index.cshtml
<ejs-grid id="Grid" allowPaging="true" allowSorting="true" allowFiltering="true" toolbar="@(new List<string>() { "Search" })">
<e-grid-filterSettings type="Menu"></e-grid-filterSettings>
<e-data-manager url="@Url.Action("UrlDatasource", "Event")" adaptor="UrlAdaptor"></e-data-manager>
<e-grid-columns>
<e-grid-column field="@nameof(Event.Id)" headerText="Id" width="120"></e-grid-column>
<e-grid-column field="@nameof(Event.UniqueId)" headerText="Unique Id" width="150"></e-grid-column>
<e-grid-column field="@nameof(Event.Name)" headerText="Name" width="120"></e-grid-column>
</e-grid-columns>
</ejs-grid>
EventController:
public IActionResult Index()
{
return View();
}
public async Task<IActionResult> UrlDatasourceAsync([FromBody] DataManagerRequest request)
{
var bllResult = await _eventService.GetFilteredDataAsync(request);
return Json(bllResult);
}
Is there a way to add an
AntiForgeryToken to this?