GRID Paging Issue

2 posts, 1 answers
  1. danny
    danny avatar
    1 posts
    Member since:
    Jul 2015

    Posted 03 Jul 2015 Link to this post

    Hi All,

     I'm completely new to this framework and I have an issue with the paging inside GRID. I don't know what is happening but the GRID return all the records instead of what have been set on pageSize. Thanks in advance.

     This is my GRID code:

     <c:url value="${api_r}"  var="transportReadUrl" />                
                    <kendo:grid name="grid" pageable="true" height="690px" sortable="true" filterable="false" groupable="false">
                        <kendo:grid-scrollable/>
                        <kendo:grid-columns>
                            <kendo:grid-column title="${codefieldtext}" field="${codefield}" width="100px" />
                            <kendo:grid-column title="${codenametext}" field="${codename}" width="100px" />                
                        </kendo:grid-columns>
                        <kendo:dataSource pageSize="20" serverPaging="true" serverSorting="true" serverFiltering="true" serverGrouping="true">
                            <kendo:dataSource-transport>            
                                <kendo:dataSource-transport-read url="${transportReadUrl}" type="POST" contentType="application/json"/>  
                                <kendo:dataSource-transport-parameterMap>
                                    <script>
                                        function(options){return JSON.stringify(options);}
                                    </script>   
                                </kendo:dataSource-transport-parameterMap>            
                            </kendo:dataSource-transport>
                            <kendo:dataSource-schema data="Results" total="Total" groups="Results">
                                <kendo:dataSource-schema-model>
                                    <kendo:dataSource-schema-model-fields>                            
                                        <kendo:dataSource-schema-model-field name="${codefield}" type="string" />
                                        <kendo:dataSource-schema-model-field name="${codename}" type="string" />
                                    </kendo:dataSource-schema-model-fields>
                                </kendo:dataSource-schema-model>
                            </kendo:dataSource-schema>
                        </kendo:dataSource>
                    </kendo:grid>

     

    This is response from the API:

    {"Total":"43","Success":"true","Results":[{"accTypeCode":"16","accTypeName":"GOVERNMENT CONTROLLED CORPORATION"},{"accTypeCode":"32","accTypeName":"STATE GOVERNMENT"},{"accTypeCode":"51","accTypeName":"BUILDING SOCIETIES"},{"accTypeCode":"57","accTypeName":"UNIT TRUST COMPANIES"},{"accTypeCode":"58","accTypeName":"INSURANCE COMPANIES AND INSURANCE RELATED COMPANIES"},{"accTypeCode":"7","accTypeName":"TRADE UNION"},{"accTypeCode":"1","accTypeName":"INDIVIDUAL"},{"accTypeCode":"12","accTypeName":"PARTNERSHIP"},{"accTypeCode":"15","accTypeName":"UNLIMITED COMPANY"},{"accTypeCode":"22","accTypeName":"MERCHANT BANKS"},{"accTypeCode":"23","accTypeName":"COMMERCIAL BANKS"},{"accTypeCode":"31","accTypeName":"FEDERAL GOVERNMENT"},{"accTypeCode":"35","accTypeName":"STATE STATUTORY AUTHORITIES"},{"accTypeCode":"45","accTypeName":"MULTILATERAL DEVELOPMENT BANKS"},{"accTypeCode":"53","accTypeName":"ASSOCIATE OF STOCKBROKING COMPANIES"},{"accTypeCode":"54","accTypeName":"OTHER STOCKBROKING COMPANIES"},{"accTypeCode":"43","accTypeName":"NON-COMMERCIAL INTERNATIONAL ORGANIZATIONS"},{"accTypeCode":"14","accTypeName":"PUBLIC LIMITED COMPANY"},{"accTypeCode":"6","accTypeName":"SCHOOL"},{"accTypeCode":"26","accTypeName":"DISCOUNT HOUSES"},{"accTypeCode":"42","accTypeName":"CREDIT GUARANTEE CORPORATION"},{"accTypeCode":"44","accTypeName":"DIPLOMATIC REPRESENTATION IN MALAYSIA"},{"accTypeCode":"56","accTypeName":"CREDIT AND LEASING COMPANIES"},{"accTypeCode":"70","accTypeName":"FINANCE COMPANIES"},{"accTypeCode":"21","accTypeName":"FINANCE COMPANIES"},{"accTypeCode":"5","accTypeName":"CLUB/SOCIETY/ASSOCIATION"},{"accTypeCode":"11","accTypeName":"SOLE PROPRIETOR"},{"accTypeCode":"33","accTypeName":"LOCAL GOVERNMENT"},{"accTypeCode":"34","accTypeName":"FEDERAL STATUTORY AUTHORITIES"},{"accTypeCode":"37","accTypeName":"PETRONAS"},{"accTypeCode":"38","accTypeName":"CAGAMAS BERHAD"},{"accTypeCode":"39","accTypeName":"ISLAMIC BANK"},{"accTypeCode":"52","accTypeName":"SUBSIDIARY OF STOCKBROKING COMPANIES"},{"accTypeCode":"59","accTypeName":"DEVELOPMENT FINANCIAL INSTITUTIONS"},{"accTypeCode":"60","accTypeName":"COOPERATIVES"},{"accTypeCode":"13","accTypeName":"PRIVATE LIMITED COMPANY"},{"accTypeCode":"24","accTypeName":"OTHER ENTITIES NOT ELSEWHERE CLASSIFIED"},{"accTypeCode":"4","accTypeName":"TRUSTEE"},{"accTypeCode":"36","accTypeName":"NON-FINANCIAL PUBLIC ENTERPRISES"},{"accTypeCode":"40","accTypeName":"CENTRAL BANK"},{"accTypeCode":"50","accTypeName":"CREDIT CARD COMPANIES"},{"accTypeCode":"55","accTypeName":"COMMODITY BROKERS"},{"accTypeCode":"61","accTypeName":"OTHER FINANCIAL INSTITUTIONS"}]}

  2. Answer
    Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 07 Jul 2015 Link to this post

    Hello danny,

    You should make sure that the service is indeed applying the paging and is processing the data in order to produce the correctly paged result. A simple implementation of this can be found in the sample application accompanying the distribution.

    Regards,
    Rosen
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. UI for ASP.NET AJAX banner
Back to Top