This question is locked. New answers and comments are not allowed.
I need to export to excel using server binding. I tried to implement export to exel using the KB article, exporting works but paging,sorting,filtering are ignored. KB article is showing export using ajax binding, do you have any sample/reference of export using server binding? The issue is Page,order by and filter not corret in controller when export method is called, these values are not being passed from view. The OnDataBound is never been called on server binding, is there a way to pass the page, filter and sort options?
I tried to read query string but on export query string is from the html action link, so page is always 1.
View:
controller:
I tried to read query string but on export query string is from the html action link, so page is always 1.
View:
@Html.ActionLink(
"Export to Excel", "Export", new { page = 1, orderBy = "~", filter = "~" }, new { id = "exportLink" })
Grid has a client event which sets the page,sort and filter.
.ClientEvents(events => events.OnDataBound(
"onDataBound"))
controller:
public ActionResult Export(
int page, string orderBy, string filter)
please help out. Thanks in advance.