Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @(Html.Telerik().Grid(Model)
- .Name("Grid")
- .ToolBar(commands => commands
- .Custom()
- .HtmlAttributes(new { id = "export" })
- .Text("Export to Excel")
- .Action("ExportExcel", "Grid", new { page = 1, orderBy = "~", filter = "~" }))
- .DataKeys(keys =>
- {
- keys.Add(Id => Id.Itemid);
- })
- public ActionResult ExportExcel(int page, string orderBy, string filter)
- {
- IEnumerable orders = GetItems().AsQueryable().ToGridModel(page, int.MaxValue, orderBy, string.Empty, filter).Data;
Add Comment
Please, Sign In to add comment