Maximize productivity with
30% off* for a limited time
using BOOSTDEV30.
Includes 3- and 5-packs.
*Some exclusions may apply.New Product LaunchBoldDesk: Help desk ticketing software starts at $10 for 3 agents.
Try it for free.
$(function () {
$("#Grid").ejGrid({
// the datasource "window.gridData" is referred from jsondata.min.js
dataSource: window.gridData,
allowPaging: true,
dataBound: function(args){
var rowIndex = args.model.dataSource.findIndex(x=>x.CustomerID == "WANDK"); //find the index of the value from dataSource
var page = rowIndex / this.model.pageSettings.pageSize; // calculate its page number
if(page > 1)
this.gotoPage(Math.ceil(page)); // navigate to that page
this.selectRows(rowIndex % this.model.pageSettings.pageSize); // selcet the record using its index
},
columns: [
. . . . . . .
]
});
}); |