Wijmo UI for the Web
pageIndex Field

Default value: null

Determines the index of the currently displayed page, when the paging feature is enabled.

To enable the paging feature, set the allowPaging option to true.

Syntax
Javascript (Usage) 
var instance; // Type: wijmo.data.IShape;
var value; // Type: number
value = instance.pageIndex;
Javascript (Specification) 
var pageIndex : number;
Example
The Quick Start sample shows a similar implementation using Knockout. To use the property without using KnockOut, use the document ready function as in this example.
$(document).ready(function () {
            var productView = new wijmo.data.ArrayDataView(sourceData());

            $("#demo-grid").wijgrid({ 
                data: productView, 
                allowPaging: true
            });
This example uses the pageIndex property to move to the next or previous page on button click.
$("#prevPage").click(function () {
    productView.pageIndex(productView.pageIndex() - 1);
});
$("#nextPage").click(function () {
    productView.pageIndex(productView.pageIndex() + 1);
});
Browser Compatibility
7
5
5

See Also

Reference

IShape Interface

 

 


© 2013 All Rights Reserved.

Send comments on this topic.