Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
141474 | Dec 13,2018 09:25 AM UTC | Jan 28,2019 04:13 AM UTC | JavaScript - EJ 2 | 5 |
![]() |
Tags: Grid |
[index.js]
var old = ej.grids.Data.prototype.generateQuery;
ej.grids.Data.prototype.generateQuery = function() {
var query = old.call(this, true);
this.pageQuery(query);
return query;
};
var refresh;
var grid = new ej.grids.Grid({
dataSource: window.inventoryData,
allowPaging: true,
allowSorting: true,
allowGrouping: true,
groupSettings: { columns: ['Country'] },
height: 400,
columns: [
{ field: 'Inventor', headerText: 'Inventor Name', width: 160 },
{ field: 'NumberofPatentFamilies', headerText: 'No of Patent Families', width: 195, textAlign: 'Right' },
{ field: 'Country', headerText: 'Country', width: 120 },
{ field: 'Active', headerText: 'Active', width: 120 },
{ field: 'Mainfieldsofinvention', headerText: 'Main fields of invention', width: 200 },
],
pageSettings: { pageCount: 5, pageSize: 5 },
load: function() {
refresh = grid.refreshing;
},
dataBound: function() {
if (refresh) {
grid.groupColumn('Country');
refresh = false;
}
},
});
grid.appendTo('#Grid');
|
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.