This is a migrated thread and some comments may be shown as answers.
Using WCF RIA with DataSource
2 Answers 95 Views
This is a migrated thread and some comments may be shown as answers.
Naunihal
Top achievements
Rank 1
Naunihal asked on 21 Dec 2011, 05:43 PM
I am trying to use WCF RIA with Kendo dataSource.
I am able to Read the Data from Json End Point of WCf RIA, but Sorting, filtering and Paging are not working as expected.
I do see that a call to WCF RIA is made when i click on the Header of the Column, but comes back with original Data, seems like Order by is Ignored.

<body>
<div id="grid2"></div>
 <script type="text/javascript">
     $(document).ready(function () {
         $("#grid2").kendoGrid({
             dataSource: { type: "json",
                 transport: { read: "http://localhost:52878/ClientBin/KendoUI-Web-Services-DomainService1.svc/JSON/GetSecurity_Users" },
                 schema: {
                     data: "GetSecurity_UsersResult.RootResults",
                     model: {
                         fields: {
                             First_Name: { type: "string" },
                             Last_Name: { type: "string" }
                         }
                     }
                 },
                 pageSize: 10,
                 serverPaging: true,
                 serverFiltering: true,
                 serverSorting: true
             },
             height: 250,
             filterable: true,
             sortable: true,
             pageable: true,
             columns: ["First_Name", "Last_Name"]
         }); 
    });            
 </script>
</body>

2 Answers, 1 is accepted

Sort by
0
Shaikh Ahmad
Top achievements
Rank 1
answered on 01 Nov 2012, 04:16 PM
Serverpaging for kendo datasource with WCF RIA can't povide us the server side filtering, paging and sorting because the URL being passed / requested is different

Here is the Silverlight query from fiddler
/EDITWeb-Service-Modules-PatientPersonal-Web-Service-PersonalDomainService.svc/binary/GetVPatientLists?$skip=0&$take=100&$includeTotalCount=True

Here is the Kendo Datasource format from fiddler
/EDITWeb-Service-Modules-PatientPersonal-Web-Service-PersonalDomainService.svc/JSONP/GetVPatientLists?callback=jQuery182025028763072567717_1351785284879&take=10&skip=0&page=1&pageSize=10&_=1351785285114

It seems that we need to use parameterMap to change the query
0
Ricky
Top achievements
Rank 1
answered on 26 Mar 2013, 01:09 AM
             I am according to Silverlight query from fiddler,
/EDITWeb-Service-Modules-PatientPersonal-Web-Service-PersonalDomainService.svc/binary/GetVPatientLists?$skip=0&$take=100&$includeTotalCount=True

to make return parameterMap

                    parameterMap: function (data, type) {                            
                        return {                           
                            $includeTotalCount: "True",
                            $skip: (data.page-1) * data.pageSize,
                            $take: data.pageSize                                
                        };
                    }
Asked by
Naunihal
Top achievements
Rank 1
Answers by
Shaikh Ahmad
Top achievements
Rank 1
Ricky
Top achievements
Rank 1
Share this question
or