Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

List DefaultPageSize #3667


User avatar
0
Ricavir created

Hi support team,

I would like to change list page size according to some custom settings and depending on appservice call. Ex : appservice1 sends its result with a page size of 15 items by default appservice2 sends its result with a page size of 50 items by default

On server side, I see that DefaultPageSize is set to 10 (on AppConsts.cs). On client side (angular project), the value can be changed by user and stored within the browser ; so that, if user opens again a previous page, its list sized in setted to its previous value (different from 10).

What would you recommend to be able to change DefaultPageSize value according to appservice ?


2 Answer(s)
  • User Avatar
    0
    alper created
    Support Team

    hi

    DefaultPageSize value should be overriden by client. Assuming client always sends pageSize value, defaultPageSize will not be used.

    For jtable you can set pageSize : <a class="postlink" href="http://www.jtable.org/ApiReference/GeneralOptions#genopt-pageSize">http://www.jtable.org/ApiReference/Gene ... t-pageSize</a>

    and for angular (primeng table) you can use rows property

    <p-dataTable #ExpiringTenantsTable
                                                 [value]="expiringTenantsData"
                                                 rows="15"
                                                 [paginator]="false"
                                                 [lazy]="false"
                                                 emptyMessage="{{l('NoData')}}"
                                                 [responsive]="primengDatatableHelper.isResponsive">
    
                                        <p-column field="tenantName" header="{{l('TenantName')}}"></p-column>
                                        <p-column field="remainingDayCount" header="{{l('RemainingDay')}}"></p-column>
                                    </p-dataTable>
    
  • User Avatar
    0
    Ricavir created

    Hi alper,

    Thanks, I will do it with primeng.