Guest User

Untitled

a guest
Jan 19th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. @(Html.Telerik().Grid(Model)
  2. .Name("Grid")
  3. .ToolBar(commands => commands
  4. .Custom()
  5. .HtmlAttributes(new { id = "export" })
  6. .Text("Export to Excel")
  7. .Action("ExportExcel", "Grid", new { page = 1, orderBy = "~", filter = "~" }))
  8.  
  9. .DataKeys(keys =>
  10. {
  11. keys.Add(Id => Id.Itemid);
  12. })
  13.  
  14. public ActionResult ExportExcel(int page, string orderBy, string filter)
  15. {
  16. IEnumerable orders = GetItems().AsQueryable().ToGridModel(page, int.MaxValue, orderBy, string.Empty, filter).Data;
Add Comment
Please, Sign In to add comment