Wijmo UI for the Web
Display Row Number
Wijmo User Guide > Widgets > Grid > Grid Concepts > Rows > Display Row Number

You can display the row number in wijgrid by using the cellFormatter option. For example, the script below sets the showRowHeader option to true, value of dataRowIndex to 5, and allowSorting option to true. The cellFormatter function displays row number in the unbound column followed by "#" symbol.

This function doesn't work properly when the allowVirtualScrolling option is set to true due to partial rendering.
Script
Copy Code
<script id="scriptInit" type="text/javascript">
    require(["wijmo.wijgrid"], function () {
        $(document).ready(function () {
            $("#wijgrid").wijgrid({
                cellClicked: function (e, args) {
                    alert(args.cell.value());
                },
                showRowHeader: true,
                dataRowIndex : 5,
                allowSorting: true,
                data: [
                    ['', 27, 'Canada', 'Adams, Craig', 'RW'],
                    ['', 43, 'Canada', 'Boucher, Philippe', 'D', 'R'],
                    ['', 24, 'Canada', 'Cooke, Matt', 'LW', 'L'],
                    ['', 87, 'Canada', 'Crosby, Sidney (C)', 'C', 'L'],
                    ['', 1, 'United States', 'Curry, John', 'G', 'L'],
              
                ],
                columns: [
                         { 
                         headerText: "#",
                         cellFormatter: function(args) {
                          if (args.row.type & wijmo.grid.rowType.data) {
                              args.$container.html("#" + args.row.dataItemIndex);
                              return true;
                                 }
                             }
                         },
                        {headerText: "Number",dataType:'number'}, 
                        {headerText: " Country",dataType:'string'},
                        {headerText:  "Player", dataType:'string'},
                        {headerText: " Position", dataType:'string'}
                        ]
                    });
                 });
             })
</script>