Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
141023 | Nov 19,2018 05:04 PM UTC | Nov 20,2018 07:25 AM UTC | jQuery | 1 |
![]() |
Tags: ejGrid |
$(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: [
. . . . . . .
]
});
}); |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.