public ActionResult ListarRolJgrid(GridDataRequest request) { int totalRecords = 0; var lstGrd = RolBL.LstRolJGrid(request, ref totalRecords); var productsData = new { total = (int)Math.Ceiling((float)totalRecords / (float)request.rows), page = request.page, records = totalRecords, rows = (from item in lstGrd select new { id = item.RolId, cell = new string[] { item.RolId.ToString(), item.Denominacion, item.Estado.ToString(), item.RolId.ToString() + "," + (item.Estado ? "1":"0") } } ).ToArray() }; return(Json(productsData, JsonRequestBehavior.AllowGet)); }