JavaScript
document.addEventListener("DOMContentLoaded", () => {
new FancyGrid({
renderTo: 'container',
title: 'Paging barType - tbar',
width: 690,
height: 400,
data: data,
defaults: {
type: 'string',
width: 100,
editale: true,
sortable: true
},
paging: {
barType: 'tbar'
},
tbar: [{
type: 'button',
text: 'Add',
action: 'add'
}],
columns: [{
index: 'id',
locked: true,
title: 'ID',
type: 'number',
editable: false,
width: 40
}, {
index: 'company',
width: 105,
locked: true,
editable: false,
title: 'Company'
}, {
index: 'name',
title: 'Name'
}, {
index: 'surname',
title: 'Sur Name'
}, {
index: 'age',
width: 60,
title: 'Age',
type: 'number'
}]
});
});
const data = [{
id: 1,
name: 'Ted',
surname: 'Smith',
position: 'Java Developer',
email: '[email protected]',
company: 'Electrical Systems',
age: 30,
education: 'High School Of Cambridge',
knownledge: 'Java, Ruby'
}, {
id: 2,
name: 'Ed',
surname: 'Johnson',
position: 'C/C++ Market Data Developer',
email: '[email protected]',
company: 'Energy and Oil',
age: 35,
education: 'High School Of Cambridge',
knownledge: 'C++'
}, {
id: 3,
name: 'Sam',
surname: 'Williams',
position: 'Technical Analyst',
email: '[email protected]',
company: 'Airbus',
age: 38,
education: 'High School Of Cambridge',
knownledge: ''
}, {
id: 4,
name: 'Alexander',
surname: 'Brown',
position: 'Project Manager',
email: '[email protected]',
company: 'Renault',
age: 24,
education: 'High School Of Cambridge',
knownledge: ''
}, {
id: 5,
name: 'Nicholas',
surname: 'Miller',
position: 'Senior Software Engineer',
email: '[email protected]',
company: 'Adobe',
age: 33,
education: 'High School Of Cambridge',
knownledge: 'Unix,...