Available in the Full Version

Data Grid - Paging

Show
records
Product IDProduct NameProduct NumberMake Flag
1Adjustable RaceAR-5381false
2Bearing BallBA-8327false
3BB Ball BearingBE-2349true
4Headset Ball BearingsBE-2908false
316BladeBL-2036true
317LL CrankarmCA-5965false
318ML CrankarmCA-6738false
319HL CrankarmCA-7457false
320Chainring BoltsCB-2903false
321Chainring NutCN-6137false

This sample is designed for a larger screen size.

On mobile, try rotating your screen, view full size, or email to another device.

This sample demonstrates the paging feature of the igGrid control. The paging feature exposes a number of options to customize this behavior, including: page size, show/hide size drop-down, show/hide paging buttons. When the page count exceeds the value of PageCountLimit (10 by default), a page drop down is automatically rendered so that the end user can select the desired page. The number of pages visible in the grid is configured by setting the visiblePages option. The look and feel of all paging buttons, page links and drop-downs may be customized through CSS.

Code View

Copy to Clipboard
<!DOCTYPE html>
<html>
<head>
    <title></title>

    <!-- Ignite UI for jQuery Required Combined CSS Files -->
    <link href="http://cdn-na.infragistics.com/igniteui/2024.2/latest/css/themes/infragistics/infragistics.theme.css" rel="stylesheet" />
    <link href="http://cdn-na.infragistics.com/igniteui/2024.2/latest/css/structure/infragistics.css" rel="stylesheet" />

    <script src="http://ajax.aspnetcdn.com/ajax/modernizr/modernizr-2.8.3.js"></script>
    <script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
    <script src="http://code.jquery.com/ui/1.11.1/jquery-ui.min.js"></script>

    <!-- Ignite UI for jQuery Required Combined JavaScript Files -->
    <script src="http://cdn-na.infragistics.com/igniteui/2024.2/latest/js/infragistics.core.js"></script>
    <script src="http://cdn-na.infragistics.com/igniteui/2024.2/latest/js/infragistics.lob.js"></script>
</head>
<body>
    <table id="grid"></table>
    <script src="/data-files/adventureworks.min.js"></script>
    <script>
        $(function () {
            $("#grid").igGrid({
                autoGenerateColumns: false,
                width: "100%",
                columns: [
                    { headerText: "Product ID", key: "ProductID", dataType: "number", width: "15%" },
                    { headerText: "Product Name", key: "Name", dataType: "string", width: "40%" },
                    { headerText: "Product Number", key: "ProductNumber", dataType: "string", width: "30%" },
                    { headerText: "Make Flag", key: "MakeFlag", dataType: "bool", width: "15%" }
                ],
                dataSource: adventureWorks,
                features: [
                    {
                        name: 'Paging',
                        type: "local",
                        pageSize: 10
                    }
                ]
            });
        });
    </script>
</body>
</html>