GridPageableSettingsBuilder

Methods

AlwaysVisible(System.Boolean)

Configures if the pager will be visible at all times.

Parameters

enabled - System.Boolean

A value indicating whether the pager should be visible when total items in DataSource is less than pageSize

Example

Razor
 
            @(Html.Kendo().Grid<OrderViewModel>()
                .Name("grid")
                .Columns(columns =>
                {
                    columns.Bound(p => p.OrderID).Filterable(false);
                    columns.Bound(p => p.Freight);  
                })
                .Pageable(p => p.AlwaysVisible(true))
                .Scrollable()
                .DataSource(dataSource => dataSource
                    .Ajax()
                    .PageSize(20)
                    .Read(read => read.Action("Orders_Read", "Grid"))
                )
            )
             

Position(Kendo.Mvc.UI.PagerPosition)

Configures the grid pager position.

Parameters

position - PagerPosition

Specifies the position in which the grid pager will be rendered. Valid values are "top" and "bottom" (default).

Example

Razor
 
            @(Html.Kendo().Grid<OrderViewModel>()
                .Name("grid")
                .Columns(columns =>
                {
                    columns.Bound(p => p.OrderID).Filterable(false);
                    columns.Bound(p => p.Freight);  
                })
                .Pageable(p => p.Position(GridPagerPosition.Top))
                .Scrollable()
                .DataSource(dataSource => dataSource
                    .Ajax()
                    .PageSize(20)
                    .Read(read => read.Action("Orders_Read", "Grid"))
                )
            )
              

PageSizes(System.Collections.IEnumerable)

Sets the page sizes of the grid.

Parameters

pageSizes - System.Collections.IEnumerable

The values shown in the pageSize dropdown

Example

Razor
 
            @(Html.Kendo().Grid<OrderViewModel>()
                .Name("grid")
                .Columns(columns =>
                {
                    columns.Bound(p => p.OrderID).Filterable(false);
                    columns.Bound(p => p.Freight);  
                })
                .Pageable(p => p.PageSizes(new int[] { 10, 20, 30 }))
                .Scrollable()
                .DataSource(dataSource => dataSource
                    .Ajax()
                    .PageSize(20)
                    .Read(read => read.Action("Orders_Read", "Grid"))
                )
            )
              

ARIATemplate(System.String)

Specifies a template used to populate the value of the aria-label attribute of the pager element.The parameters available for the template are: page - The current page. or totalPages - The total number of pages..

Parameters

template - System.String

The value that configures the ariatemplate.

Example

Razor
 
             .Pageable(pageable => {
                 pageable.ARIATemplate("Current page is #=page#");
             })
             

ARIATemplateId(System.String)

The id of the script element used for ARIATemplate

Parameters

templateId - System.String

The value that configures the ariatemplate.

Example

Razor
 
             .Pageable(pageable => {
                 pageable.ARIATemplateId("ariaTemplate");
             })
             

ARIATemplateView(Microsoft.AspNetCore.Html.IHtmlContent)

The view template used for ARIATemplate

Parameters

templateView - Microsoft.AspNetCore.Html.IHtmlContent

The view that configures the ariatemplate.

Example

Razor
 
             .Pageable(pageable => {
                 pageable.ARIATemplateView(Html.Partial("TemplateView"));
             })
             

ARIATemplateHandler(System.String)

The template that renders the content of the aria-label attribute.

Parameters

templateHandler - System.String

The JavaScript function that will return the template content.

Example

Razor
 
             .Pageable(pageable => {
                 pageable.ARIATemplateHandler("ariaTemplate");
             })
             

PageSizes(System.Int32[])

Sets the page sizes of the grid.

Parameters

pageSizes - System.Int32[]

The values shown in the pageSize dropdown

Example

Razor
 
             .Pageable(pageable => {
                 pageable.PageSizes(new int[] { 10, 20, 50 });
             })
             

PageSizes(System.Boolean)

Sets the page sizes of the grid.

Parameters

enabled - System.Boolean

A value indicating whether to enable the page sizes dropdown

Example

Razor
 
             .Pageable(pageable => {
                 pageable.PageSizes(true);
             })
             

ButtonCount(System.Int32)

Sets the number of buttons displayed in the numeric pager. Default is 10.

Parameters

value - System.Int32

The value

Example

Razor
 
             .Pageable(pageable => {
                 pageable.ButtonCount(5);
             })
             

If set to true the user could navigate the widget using the keyboard navigation. By default keyboard navigation is disabled.

Parameters

enabled - System.Boolean

The value that configures the navigatable.

Example

Razor
 
             .Pageable(pageable => {
                 pageable.Navigatable(true);
             })
             

Numeric(System.Boolean)

Defines if the numeric portion of the pager will be shown.

Parameters

enabled - System.Boolean

The value that determines whether the numeric section will be shown

Example

Razor
 
             .Pageable(pageable => {
                 pageable.Numeric(true);
             })
             

Info(System.Boolean)

Defines if a label showing current paging information will be displayed.

Parameters

enabled - System.Boolean

The value that determines whether the paging information will be shown

Example

Razor
 
             .Pageable(pageable => {
                 pageable.Info(false);
             })
             

Input(System.Boolean)

Defines if an input element which allows the user to navigate to given page will be displayed.

Parameters

enabled - System.Boolean

The value that enables or disables the input element

Example

Razor
 
             .Pageable(pageable => {
                 pageable.Input(false);
             })
             

Refresh(System.Boolean)

Defines if a refresh button will be displayed.

Parameters

enabled - System.Boolean

The value that enables or disables the refresh button

Example

Razor
 
             .Pageable(pageable => {
                 pageable.Refresh(false);
             })
             

Responsive(System.Boolean)

If set to false the pager will not be responsive. By default the pager is responsive.

Parameters

enabled - System.Boolean

The value that configures the responsive.

Example

Razor
 
             .Pageable(pageable => {
                 pageable.Responsive(false);
             })
             

Messages(System.Action)

Configures the messages.

Parameters

configurator - System.Action<PageableMessagesBuilder>

The value that configures the responsive.

Example

Razor
 
             .Pageable(pageable => {
                 pageable.Messages(messages => messages.AllPages("All"));
             })
             

PreviousNext(System.Boolean)

Parameters

enabled - System.Boolean

Enabled(System.Boolean)

Enables or disables paging.

Parameters

value - System.Boolean

Example

Razor
 
             @( Html.Kendo().Grid(Model)
                        .Name("Grid")
                        .Pageable(paging => paging.Enabled((bool)ViewData["enablePaging"]))
            )
             

AdaptiveMode(Kendo.Mvc.UI.AdaptiveMode)

Specifies a value whether the page sizes dropdown will be adaptive.

Parameters

adaptiveMode - AdaptiveMode

Example

Razor
 
             .Pageable(pageable => {
                 pageable.AdaptiveMode(AdaptiveMode.Auto);
             })