This is a migrated thread and some comments may be shown as answers.

Grid through Remote data binding is not working

1 Answer 81 Views
Grid
This is a migrated thread and some comments may be shown as answers.
BOB
Top achievements
Rank 1
BOB asked on 30 Apr 2013, 09:51 AM
Hi,

I'm using KendoUi framework web for one of the client projects and working on Grid component as part of my learning experience but some how I stuff with one of the issue as described below:

I created a webservice which returns the beneficiary data by passing input parameter  as part of the query string in webservice request as shown below

URL: http://127.0.0.1:7101/Rest/resources/beneficiaries/retrieve?memberNo=1&user=KK&externalId=11111&externalSys=IPP

Response : {"beneficiariesBeansList":[{"firstNm":"kriss","lastNm":"kilaru","middleNm":"k","percent":"49","relationCd":"01"},{"firstNm":"krishna","lastNm":"kilaru","middleNm":"k","percent":"51","relationCd":"01"}],"elapsedTime":"1016","exceptionCount":"0","exceptionString":"","externalId":"11111","externalSys":"IPP"}

Now in my page I created a datasource component as 

$("#ID").kendoGrid( {
                  dataSource : {
                                type: "odata",
                                serverPaging: true,
                                serverSorting: true,
                                pageSize: 100,
                                transport: {
                                    read: "http://127.0.0.1:7101/Rest/resources/beneficiaries/retrieve?memberNo=1&user=KK&externalId=11111&externalSys=IPP"
                                }
                    }, 
                  pageable : false, 
                  selectable: "single",
                  height : 450,
                  toolbar : [ { name: "create", text: "Add Beneficiary" }], 
                  columns : [   {field : "relationCd", title : "Relationship", width : "100px"},
                                {field : "firstNm", title : "First Name", width : "100px"},
                               // {field : "UnitsInStock", title : "Units In Stock", width : "100px", footerTemplate: "Total : #= sum#"},
                                {field : "middleNm", title : "Middle Name", width : "100px"},
                                {field : "lastNm", title : "Last Name", width : "100px"},
                                {command : ["edit"], title : " ", width : "60px"},
                                {command : {name : "bank", text : "Bank",click: showBankDetails }, title: " ", width: "60px" },
                                {command : {name : "destroy", text : "Remove", className: "btn-destroy"}, title : " ", width : "80px"}
                            ], 
                editable : "popup"
              });

A blank page rendered when page loaded and even I couldnt see any log files, so anyone could help me out where I went wrong inorder to display the data.

Thanks  a lot
Amar

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 02 May 2013, 05:33 AM
Hello Bob,

 The response of your remote service  doesn't look like a valid OData response. Can you confirm that your service is actually an OData service? If not - you shouldn't set the type of the data source to "odata" and should use the schema option to tell the data source what the response format is.

 You can check your browser developer tools console for any other issues or JavaScript errors.

Regards,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
BOB
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or