Using WCF RIA with DataSource

3 posts, 0 answers
  1. Naunihal
    Naunihal avatar
    12 posts
    Member since:
    Jun 2008

    Posted 21 Dec 2011 Link to this post

    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. Shaikh Ahmad
    Shaikh Ahmad avatar
    20 posts
    Member since:
    Oct 2012

    Posted 01 Nov 2012 Link to this post

    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
  3. Ricky
    Ricky avatar
    3 posts
    Member since:
    Sep 2008

    Posted 25 Mar 2013 Link to this post

                 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                                
                            };
                        }
Back to Top