New to Kendo UI for jQueryStart a free 30-day trial

Messages

configuration

Defines texts shown within the pager. Use this option to customize or localize the pager messages.

messages

Object
<div id="pager"></div>

<script>
    var dataSource = new kendo.data.DataSource({
      data: [
        { productName: "Tea", category: "Beverages" },
        { productName: "Coffee", category: "Beverages" },
        { productName: "Ham", category: "Food" },
        { productName: "Bread", category: "Food" },
        { productName: "Milk", category: "Beverages" },
        { productName: "Cheese", category: "Food" }
      ],
      pageSize: 2
    });

    $("#pager").kendoPager({
      dataSource: dataSource,
      input: true,
      numeric: true,
      pageSizes: [2, 4, "all"],
      messages: {
        display: "Showing {0}-{1} of {2} items",
        empty: "No data available",
        page: "Page",
        of: "of {0}",
        itemsPerPage: "items per page",
        first: "Go to first page",
        previous: "Go to previous page",
        next: "Go to next page",
        last: "Go to last page",
        allPages: "All"
      }
    });

    dataSource.read();
</script>

The text displayed for the item that represents the allPages option when allPages is enabled.

Default: "All"

<div id="pager"></div>

<script>
    var dataSource = new kendo.data.DataSource({
      data: [
        { productName: "Tea", category: "Beverages" },
        { productName: "Coffee", category: "Beverages" },
        { productName: "Ham", category: "Food" },
        { productName: "Bread", category: "Food" }
      ],
      pageSize: 2
    });

    $("#pager").kendoPager({
      dataSource: dataSource,
      numeric: false,
      pageSizes: [ 2, 3, 'all'],
      messages: {
        allPages: "See All"
      }
    });

    dataSource.read();
</script>
<style>
  #pager {
   margin-top: 100px;
  }
</style>

The pager info text. Uses kendo.format.

Contains three placeholders:

  • {0} - the first data item index
  • {1} - the last data item index
  • {2} - the total number of data items

Default: "{0} - {1} of {2} items"

<div id="pager"></div>

<script>
    var dataSource = new kendo.data.DataSource({
      data: [
        { productName: "Tea", category: "Beverages" },
        { productName: "Coffee", category: "Beverages" },
        { productName: "Ham", category: "Food" },
        { productName: "Bread", category: "Food" }
      ],
      pageSize: 2
    });

    $("#pager").kendoPager({
      dataSource: dataSource,
      messages: {
        display: "Showing {0}-{1} from {2} data items"
      }
    });

    dataSource.read();
</script>
<style>
  #pager {
   margin-top: 100px;
  }
</style>

The text displayed when the DataSource view does no contain items.

Default: "No items to display"

<div id="pager"></div>

<script>
    var dataSource = new kendo.data.DataSource({
      data: [],
      pageSize: 2
    });

    $("#pager").kendoPager({
      dataSource: dataSource,
      messages: {
        empty: "No data"
      }
    });

    dataSource.read();
</script>
<style>
  #pager {
   margin-top: 100px;
  }
</style>

The tooltip of the button which navigates to the first page.

Default: "Go to the first page"

<div id="pager"></div>

<script>
    var dataSource = new kendo.data.DataSource({
      data: [
        { productName: "Tea", category: "Beverages" },
        { productName: "Coffee", category: "Beverages" },
        { productName: "Ham", category: "Food" },
        { productName: "Bread", category: "Food" }
      ],
      pageSize: 2,
      page: 2
    });

    $("#pager").kendoPager({
      dataSource: dataSource,
      messages: {
        first: "First Page"
      }
    });

    dataSource.read();
</script>
<style>
  #pager {
   margin-top: 100px;
  }
</style>

The label displayed after the page size DropDownList.

Default: "items per page"

<div id="pager"></div>

<script>
    var dataSource = new kendo.data.DataSource({
      data: [
        { productName: "Tea", category: "Beverages" },
        { productName: "Coffee", category: "Beverages" },
        { productName: "Ham", category: "Food" },
        { productName: "Bread", category: "Food" }
      ],
      pageSize: 2
    });

    $("#pager").kendoPager({
      dataSource: dataSource,
      pageSizes: true,
      numeric:false,
      messages: {
        itemsPerPage: "data items per page"
      }
    });

    dataSource.read();
</script>
<style>
  #pager {
   margin-top: 100px;
  }
</style>

The tooltip of the button which navigates to the last page.

Default: "Go to the last page"

<div id="pager"></div>

<script>
    var dataSource = new kendo.data.DataSource({
      data: [
        { productName: "Tea", category: "Beverages" },
        { productName: "Coffee", category: "Beverages" },
        { productName: "Ham", category: "Food" },
        { productName: "Bread", category: "Food" }
      ],
      pageSize: 2
    });

    $("#pager").kendoPager({
      dataSource: dataSource,
      messages: {
        last: "Last Page"
      }
    });

    dataSource.read();
</script>
<style>
  #pager {
   margin-top: 100px;
  }
</style>

The tooltip of the button which navigates to the next page.

Default: "Go to the next page"

<div id="pager"></div>

<script>
    var dataSource = new kendo.data.DataSource({
      data: [
        { productName: "Tea", category: "Beverages" },
        { productName: "Coffee", category: "Beverages" },
        { productName: "Ham", category: "Food" },
        { productName: "Bread", category: "Food" }
      ],
      pageSize: 2
    });

    $("#pager").kendoPager({
      dataSource: dataSource,
      messages: {
        next: "Next Page"
      }
    });

    dataSource.read();
</script>
<style>
  #pager {
   margin-top: 100px;
  }
</style>

The label displayed before the pager input. Uses kendo.format. Contains one optional placeholder {0} which represents the total number of pages.

Default: "of {0}"

<div id="pager"></div>

<script>
    var dataSource = new kendo.data.DataSource({
      data: [
        { productName: "Tea", category: "Beverages" },
        { productName: "Coffee", category: "Beverages" },
        { productName: "Ham", category: "Food" },
        { productName: "Bread", category: "Food" }
      ],
      pageSize: 2
    });

    $("#pager").kendoPager({
      dataSource: dataSource,
      input: true,
      numeric: true,
      messages: {
        of: "from {0}"
      }
    });

    dataSource.read();
</script>
<style>
  #pager {
   margin-top: 100px;
  }
</style>

The label displayed before the pager input.

Default: "Page"

<div id="pager"></div>

<script>
    var dataSource = new kendo.data.DataSource({
      data: [
        { productName: "Tea", category: "Beverages" },
        { productName: "Coffee", category: "Beverages" },
        { productName: "Ham", category: "Food" },
        { productName: "Bread", category: "Food" }
      ],
      pageSize: 2
    });

    $("#pager").kendoPager({
      dataSource: dataSource,
      input: true,
      numeric: true,
      messages: {
        page: "Enter page"
      }
    });

    dataSource.read();
</script>
<style>
  #pager {
   margin-top: 100px;
  }
</style>

The title of the numeric link page buttons of the Pager. The parameters available for the template are:

  • page - The page that will becomes selected when clicking the button.

Default: "Page {0}"

<div id="pager"></div>

<script>
    var dataSource = new kendo.data.DataSource({
      data: [
        { productName: "Tea", category: "Beverages" },
        { productName: "Coffee", category: "Beverages" },
        { productName: "Ham", category: "Food" },
        { productName: "Bread", category: "Food" }
      ],
      pageSize: 2
    });

    $("#pager").kendoPager({
      dataSource: dataSource,
      input: true,
      messages: {
        pageButtonLabel: "This is page {0}"
      }
    });

    dataSource.read();
</script>
<style>
  #pager {
   margin-top: 100px;
  }
</style>

The label applied to the page size DropDownList.

Default: "Page sizes drop down"

<div id="pager"></div>

<script>
    var dataSource = new kendo.data.DataSource({
      data: [
        { productName: "Tea", category: "Beverages" },
        { productName: "Coffee", category: "Beverages" },
        { productName: "Ham", category: "Food" },
        { productName: "Bread", category: "Food" }
      ],
      pageSize: 2
    });

    $("#pager").kendoPager({
      dataSource: dataSource,
      input: true,
      numeric: true,
      messages: {
        pageSizeDropDownLabel: "page size"
      },
      pageSizes: [1, 2, 5]
    });

    dataSource.read();
</script>

The tooltip of the button which navigates to the previous page.

Default: "Go to the previous page"

<div id="pager"></div>

<script>
    var dataSource = new kendo.data.DataSource({
      data: [
        { productName: "Tea", category: "Beverages" },
        { productName: "Coffee", category: "Beverages" },
        { productName: "Ham", category: "Food" },
        { productName: "Bread", category: "Food" }
      ],
      pageSize: 2,
      page: 2
    });

    $("#pager").kendoPager({
      dataSource: dataSource,
      messages: {
        previous: "Previous Page"
      }
    });

    dataSource.read();
</script>
<style>
  #pager {
   margin-top: 100px;
  }
</style>

The tooltip of the refresh button.

Default: "Refresh"

<div id="pager"></div>

<script>
    var dataSource = new kendo.data.DataSource({
      data: [
        { productName: "Tea", category: "Beverages" },
        { productName: "Coffee", category: "Beverages" },
        { productName: "Ham", category: "Food" },
        { productName: "Bread", category: "Food" }
      ],
      pageSize: 2
    });

    $("#pager").kendoPager({
      dataSource: dataSource,
      messages: {
        refresh: "Refresh data"
      },
      refresh: true
    });

    dataSource.read();
</script>
<style>
  #pager {
   margin-top: 100px;
  }
</style>