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

grid only show 20 rows

4 Answers 1332 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Christian Sandöy
Top achievements
Rank 2
Christian Sandöy asked on 05 Dec 2018, 02:53 PM

My grid only show max 20 row

It does not matter if paging is disabled

<kendo-grid name="grdAfdeling" selectable="true" on-change="onChangeAfdeling" deferred="true">
            <datasource server-operation="false" type="DataSourceTagHelperType.Ajax">
                <transport>
                    <read url="/Medarbejder/Hent_Medarbejder_Afdeling" data="hentAfdID" />
                </transport>
            </datasource>
            <scrollable enabled="false" />
            <columns>
                <column field="ID" hidden="true" />
                <column field="Navn" title="Navn" />
                <column field="Lokalnr" title="Lokalnr." width="80" />
                <column field="Mobilnet" title="Mobil Lokalnr." width="90" />
                <column field="Mobilnr" title="Mobilnr." />
                <column field="Email" title="Email" />
                @if (User.IsInRole("w_Paaroerende"))
                {
                <column field="Familie" title="Familie" encoded="false" />
                }
                <column field="BilledUrl" title="Billed" template="<img src='#= BilledUrl #' alt='image' width='70' />" />
            </columns>
        </kendo-grid>

4 Answers, 1 is accepted

Sort by
0
Christian Sandöy
Top achievements
Rank 2
answered on 06 Dec 2018, 09:40 AM
It look likes the page-size is default 20 even if I dont use paging
0
Tsvetomir
Telerik team
answered on 10 Dec 2018, 02:55 PM
Hi Christian,

By default, if there is no page-size attribute present, the data will be visualized on one page. Can you verify that there is no external logic responsible for the page size of the grid?

If only 20 records are loaded and the page-size attribute is not present, probably the server returns only 20 items at a time. Please ensure that the records returned from the server are more than 20 and they have not been modified before being passed to the grid.

In case the issue persists, please elaborate in further details on the exact set-up of the data source or share any information that you find relevant to the case.


Kind regards,
Tsvetomir
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Christian Sandöy
Top achievements
Rank 2
answered on 10 Dec 2018, 03:13 PM

Hi Tsvetomir

There is  no external logic responsible for the page size  

There is no page-size attribute in the grid

The server loads more than 20 records

If I set a page-size = 999 I get all data


0
Tsvetomir
Telerik team
answered on 13 Dec 2018, 02:37 PM
Hi Christian,

I have noticed that you have set the data source type to Ajax. When you set the data source, the Kendo UI Grid provides a fleet of configurations to make the data source compatible with the ToDataSourceResult() method. More information about the method of interest can be found in the Important note of the following article:

https://docs.telerik.com/aspnet-mvc/helpers/grid/binding/ajax-binding

Also, return a plain array from the server since when you set the data source to Ajax, the returned result will be converted to a state which is compatible with the Ajax type data source. Try removing the type attribute from the DataSource declaration. 

As a side note, the pageable attribute by default is disabled and the pageSize attribute has no default value. More information can be found in the following articles: Attached you can find a sample project demonstrating how the grid visualizes the whole data. Check it out and in case the issue persists, please modify the project and send it back to me. 


Kind regards,
Tsvetomir
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
Christian Sandöy
Top achievements
Rank 2
Answers by
Christian Sandöy
Top achievements
Rank 2
Tsvetomir
Telerik team
Share this question
or