{"action":"closed","issue":{"url":"https://api.github.com/repos/tabalinas/jsgrid-php/issues/17","repository_url":"https://api.github.com/repos/tabalinas/jsgrid-php","labels_url":"https://api.github.com/repos/tabalinas/jsgrid-php/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/tabalinas/jsgrid-php/issues/17/comments","events_url":"https://api.github.com/repos/tabalinas/jsgrid-php/issues/17/events","html_url":"https://github.com/tabalinas/jsgrid-php/issues/17","id":213078350,"number":17,"title":"OData is not displaying data on the jsgrid","user":{"login":"venkimanohar","id":3865032,"avatar_url":"https://avatars1.githubusercontent.com/u/3865032?v=3","gravatar_id":"","url":"https://api.github.com/users/venkimanohar","html_url":"https://github.com/venkimanohar","followers_url":"https://api.github.com/users/venkimanohar/followers","following_url":"https://api.github.com/users/venkimanohar/following{/other_user}","gists_url":"https://api.github.com/users/venkimanohar/gists{/gist_id}","starred_url":"https://api.github.com/users/venkimanohar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/venkimanohar/subscriptions","organizations_url":"https://api.github.com/users/venkimanohar/orgs","repos_url":"https://api.github.com/users/venkimanohar/repos","events_url":"https://api.github.com/users/venkimanohar/events{/privacy}","received_events_url":"https://api.github.com/users/venkimanohar/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-03-09T15:49:53Z","updated_at":"2017-03-10T16:48:06Z","closed_at":"2017-03-10T16:48:06Z","body":"\r\n![js-gridissue](https://cloud.githubusercontent.com/assets/3865032/23757964/3da8858c-04b6-11e7-847d-022c8ac59ead.JPG)\r\nI hope you can help me out with identifying the problem with OData binding with jsgrid.  I added debugger on the code to check whether any error is displayed on the developer tool but it didn't display any error. Here is my code and a screenshot:  \r\n\r\n<html><head>\r\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\r\n    <title>jsGrid - OData Service Scenario</title>\r\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"naw_demo.css\">\r\n\r\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"naw_jsgrid.css\">\r\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"naw_theme.css\">\r\n \r\n    <script src=\"naw_jquery183.js\"></script>\r\n\r\n    <script src=\"naw_jsgrid.core.js\"></script>\r\n    <script src=\"naw_jsgrid.loadindicator.js\"></script>\r\n    <script src=\"naw_jsgrid.loadstrategies.js\"></script>\r\n    <script src=\"naw_jsgrid.sortstrategies.js\"></script>\r\n    <script src=\"naw_jsgrid.field.js\"></script>\r\n    <script src=\"naw_jsgrid.field.text.js\"></script>\r\n    <script src=\"naw_jsgrid.field.number.js\"></script>\r\n    <script src=\"naw_jsgrid.field.select.js\"></script>\r\n    <script src=\"naw_jsgrid.field.checkbox.js\"></script>\r\n    <script src=\"naw_jsgrid.field.control.js\"></script>\r\n    <script src=\"naw_customfunctions.js\"></script>\r\n\r\n    <style>\r\n        .rating {\r\n            color: #F8CA03;\r\n        }\r\n    </style>\r\n<meta><meta><meta><meta><meta><meta><meta><meta></head>\r\n<body style=\"word-wrap: break-word;\">\r\n    <h1>OData Service</h1>\r\n    <div id=\"jsGrid\"></div>\r\n\r\n    <script>\r\n       Xrm = window.Xrm;\r\n        $(function() {\r\n\r\n            $(\"#jsGrid\").jsGrid({\r\n                height: \"400px\",\r\n                width: \"400px\",\r\n                sorting: true,\r\n                paging: false,\r\n                autoload: true,\r\n                controller: {\r\n                    loadData: function() {\r\n\t\t\t\t\tvar accountId = window.parent.Xrm.Page.data.entity.getId();\r\n\t\t\t\t\tvar serverUrl = window.parent.Xrm.Page.context.getClientUrl();\r\n\t\t\t\t\tvar oDataUri = serverUrl + \"/xrmservices/2011/OrganizationData.svc/ContactSet?$select=FirstName&$filter=ParentCustomerId/Id eq guid'\" + accountId + \"'\";\r\n\t\t\t\t\tvar jSonArray = new Array();\r\n\r\n                    var d = $.Deferred();\r\n\t\t \r\n\t\t\t\t\t\t$.ajax({\r\n\t\t\t\t\t\t\ttype: \"GET\",\r\n\t\t\t\t\t\t\tcontentType:  \"application/json; charset=utf-8\",\r\n\t\t\t\t\t\t\tdataType: \"json\",\r\n\t\t\t\t\t\t\turl: oDataUri,\r\n\t\t\t\t\t\t\tasync:false,\r\n\t\t\t\t\t\t\tbeforeSend: function (XMLHttpRequest) {       \t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tXMLHttpRequest.setRequestHeader(\"Accept\", \"application/json\");\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t success: function (data, textStatus, XmlHttpRequest) {\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif (data) {\r\n\t\t\t\t\t\t\t\t    data = data.d;\r\n\t\t\t\t\t\t\t\t\tjSonArray.push(data);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\terror: function (XmlHttpRequest, textStatus, errorThrown) {\r\n\t\t\t\t\t\t\t\talert(\"Error :  has occured during retrieval of the contacts\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}).done(function(response){\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tdebugger;\r\n\t\t\t\t\t\t\td.resolve(response);\r\n\t\t\t\t\t\t});\r\n\t\t \r\n\t\t\t\t\t\treturn d.promise();\r\n                    }\r\n                },\r\n                fields: [\r\n                    { name: \"FirstName\", type: \"text\", width: 600 }\r\n                ]\r\n            });\r\n\r\n        });\r\n    </script>\r\n\r\n\r\n</body></html>\r\n![js-gridissue](https://cloud.githubusercontent.com/assets/3865032/23757904/16e20716-04b6-11e7-93fe-faf751ce7ce2.JPG)\r\n"}}
{"actor":{"display_login":"venkimanohar"}}