public virtual ActionResult GridGetAllNavigation() { gridMvcHelper = new GridMvcHelper(); IOrderedQueryable <CMSNavigation> allNavigation = CMSNavigation.GetAll().OrderBy(x => x.sort); AjaxGrid <CMSNavigation> grid = this.gridMvcHelper.GetAjaxGrid(allNavigation); return(PartialView(grid)); }
public virtual ActionResult GridGetAllNavigationPager(string txtSearch, int?page) { gridMvcHelper = new GridMvcHelper(); IOrderedQueryable <CMSNavigation> allData = CMSNavigation.GetAll().OrderBy(x => x.sort); if (!string.IsNullOrEmpty(txtSearch)) { allData = allData.Where(x => x.Name.Contains(txtSearch) || x.Controller.Contains(txtSearch)).OrderBy(x => x.sort); } AjaxGrid <CMSNavigation> grid = this.gridMvcHelper.GetAjaxGrid(allData, page); object jsonData = this.gridMvcHelper.GetGridJsonData(grid, MVC.CMSNavigation.Views.GridGetAllNavigation, this); return(Json(jsonData, JsonRequestBehavior.AllowGet)); }