New to Telerik UI for ASP.NET MVC? Download free 30-day trial

GridPageableSettingsBuilder

Methods

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

value - System.String

The value that configures the ariatemplate.

Example


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

ARIATemplateId(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

value - System.String

The value that configures the ariatemplate.

Example


             <script id="pageableAriaTemplateId" type="text/x-kendo-template">
                 HTML template
             </script>
            @(Html.Kendo().Grid<OrderViewModel>()
                .Name("grid")
                .Columns(columns =>
                {
                    columns.Bound(p => p.OrderID).Filterable(false);
                    columns.Bound(p => p.Freight);  
                })
                .Pageable(p => p.ARIATemplateId("pageableAriaTemplateId"))
                .Scrollable()
                .DataSource(dataSource => dataSource
                    .Ajax()
                    .PageSize(20)
                    .Read(read => read.Action("Orders_Read", "Grid"))
                )
            )

ARIATemplateView(System.Web.Mvc.MvcHtmlString)

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

value - System.Web.Mvc.MvcHtmlString

The value that configures the ariatemplate.

Example


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

ARIATemplateHandler(System.String)

Parameters

value - System.String

AlwaysVisible(System.Boolean)

Sets alwaysVisible option for the grid's pager.

Parameters

enabled - System.Boolean

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

Example


            @(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.GridPagerPosition)

Configures the grid pager position.

Parameters

position - GridPagerPosition

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

Example


            @(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


            @(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"))
                )
            )

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


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

ButtonCount(System.Int32)

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

Parameters

value - System.Int32

The maximum number of buttons displayed in the numeric pager. The pager will display ellipsis (...) if there are more pages than the specified number.

Example


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

Numeric(System.Boolean)

If set to true the pager will display buttons for navigating to specific pages. By default those buttons are displayed.

Parameters

enabled - System.Boolean

Enables or disables the buttons for navigating to specific pages.

Example


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

Info(System.Boolean)

Enables or disables additional info for the records in the pager.

Parameters

enabled - System.Boolean

Enables or disables the information about the records in the pager.

Example


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

Input(System.Boolean)

Enables or disables the manual input for the pager.

Parameters

enabled - System.Boolean

Enables or disables the manual input for the pager.

Example


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

Refresh(System.Boolean)

If set to true the pager will display the refresh button. Clicking the refresh button will refresh the grid. By default the refresh button is not displayed.

Parameters

enabled - System.Boolean

The boolean parameter for the Refresh option of the Pager in a Grid.

Example


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

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


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

Messages(System.Action)

The text messages displayed in pager. Use this option to customize or localize the pager messages.

Parameters

configurator - System.Action<PageableMessagesBuilder>

Example


            @(Html.Kendo().Grid<OrderViewModel>()
                .Name("grid")
                .Columns(columns =>
                {
                    columns.Bound(p => p.OrderID).Filterable(false);
                    columns.Bound(p => p.Freight);  
                })
                .Pageable(p => p.Messages(m => m.Display("Showing {0}-{1} from {2} data items")))
                .Scrollable()
                .DataSource(dataSource => dataSource
                    .Ajax()
                    .PageSize(20)
                    .Read(read => read.Action("Orders_Read", "Grid"))
                )
            )

PreviousNext(System.Boolean)

If set to true the pager will display buttons for going to the first, previous, next and last pages. By default those buttons are displayed.

Parameters

enabled - System.Boolean

The boolean parameter for the PreviousNext option of the Pager in a Grid.

Example


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

Enabled(System.Boolean)

Enables or disables paging.

Parameters

value - System.Boolean

Enables or disables paging.

Example


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

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

Parameters

value - System.Boolean

The value that configures the navigatable functionality of the pager in the Grid.

Example


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

In this article
Not finding the help you need?