Example #1
0
        public ActionResult Grid()
        {
            var items = Mapper.Map <IEnumerable <ApplicationUser>, IEnumerable <UserViewModel> >(context.Users);
            var grid  = new UserAjaxPagingGrid(items, 1, false);

            return(PartialView("_UserGrid", grid));
        }
Example #2
0
        public JsonResult GetUserList(int page)
        {
            var items = Mapper.Map <IEnumerable <ApplicationUser>, IEnumerable <UserViewModel> >(context.Users);
            var grid  = new UserAjaxPagingGrid(items, page, true);

            return(Json(new
            {
                Html = RenderPartialViewToString("_UserGrid", grid),
                HasItems = grid.DisplayingItemsCount >= grid.Pager.PageSize
            }, JsonRequestBehavior.AllowGet));
        }