{"action":"reopened","issue":{"url":"https://api.github.com/repos/joeharrison714/MVCGrid.Net/issues/54","repository_url":"https://api.github.com/repos/joeharrison714/MVCGrid.Net","labels_url":"https://api.github.com/repos/joeharrison714/MVCGrid.Net/issues/54/labels{/name}","comments_url":"https://api.github.com/repos/joeharrison714/MVCGrid.Net/issues/54/comments","events_url":"https://api.github.com/repos/joeharrison714/MVCGrid.Net/issues/54/events","html_url":"https://github.com/joeharrison714/MVCGrid.Net/issues/54","id":158206812,"number":54,"title":"paging error ","user":{"login":"MehranMazhar","id":11898578,"avatar_url":"https://avatars.githubusercontent.com/u/11898578?v=3","gravatar_id":"","url":"https://api.github.com/users/MehranMazhar","html_url":"https://github.com/MehranMazhar","followers_url":"https://api.github.com/users/MehranMazhar/followers","following_url":"https://api.github.com/users/MehranMazhar/following{/other_user}","gists_url":"https://api.github.com/users/MehranMazhar/gists{/gist_id}","starred_url":"https://api.github.com/users/MehranMazhar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MehranMazhar/subscriptions","organizations_url":"https://api.github.com/users/MehranMazhar/orgs","repos_url":"https://api.github.com/users/MehranMazhar/repos","events_url":"https://api.github.com/users/MehranMazhar/events{/privacy}","received_events_url":"https://api.github.com/users/MehranMazhar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-02T18:21:21Z","updated_at":"2016-06-02T18:48:24Z","closed_at":null,"body":"when i try using paging grid by mvcgrid i get this 'There was a problem loading the grid.'\r\n\r\n\r\nhere my code \r\n`\r\n            MVCGridDefinitionTable.Add(\"PagingGrid\", new MVCGridBuilder<KeyCodesBaadraan>()\r\n    .WithAuthorizationType(AuthorizationType.AllowAnonymous)\r\n    .AddColumns(cols =>\r\n    {\r\n        cols.Add(\"Id\").WithSorting(false)\r\n            .WithValueExpression(p => p.KeyCodeID.ToString());\r\n        cols.Add(\"FirstName\").WithHeaderText(\"First Name\")\r\n            .WithValueExpression(p => p.FullName);\r\n        cols.Add(\"LastName\").WithHeaderText(\"Last Name\")\r\n            .WithValueExpression(p => p.Mobile);\r\n    })\r\n    .WithSorting(true, \"LastName\")\r\n    .WithPaging(true, 10)\r\n    .WithRetrieveDataMethod((context) =>\r\n    {\r\n        var options = context.QueryOptions;\r\n        var result = new QueryResult<KeyCodesBaadraan>();\r\n        using (var db = new WendaDBEntities())\r\n        {\r\n            var query = db.KeyCodesBaadraan.AsQueryable();\r\n            result.TotalRecords = query.Count();\r\n            if (!String.IsNullOrWhiteSpace(options.SortColumnName))\r\n            {\r\n                switch (options.SortColumnName.ToLower())\r\n                {\r\n                    case \"firstname\":\r\n                        query = query.OrderBy(p => p.FullName);\r\n                        break;\r\n                    case \"lastname\":\r\n                        query = query.OrderBy(p => p.Mobile);\r\n                        break;\r\n                }\r\n            }\r\n            if (options.GetLimitOffset().HasValue)\r\n            {\r\n                query = query.Skip(options.GetLimitOffset().Value).Take(options.GetLimitRowcount().Value);\r\n            }\r\n            result.Items = query.ToList();\r\n        }\r\n        return result;\r\n    })\r\n);`"}}
{"actor":{"display_login":"MehranMazhar"}}