FancyGrid Locked Columns

by FancyGrid Inc.

HTML

<script src="https://cdn.jsdelivr.net/npm/fancygrid/client/fancy.min.js"></script>

<div id="container"></div>

JavaScript

document.addEventListener("DOMContentLoaded", () => {
  new FancyGrid({
    title: 'Locked Columns',
    renderTo: 'container',
    width: 650,
    height: 400,
    data: data,
    defaults: {
      type: 'string',
      width: 100,
      sortable: true,
      resizable: true
    },
    columns: [{
      index: 'company',
      width: 105,
      locked: true,
      title: 'Company'
    }, {
      index: 'name',
      title: 'Name'
    }, {
      index: 'surname',
      title: 'Sur Name'
    }, {
      index: 'age',
      width: 60,
      title: 'Age',
      type: 'number'
    }, {
      index: 'knownledge',
      title: 'Knownledge'
    }, {
      index: 'position',
      title: 'Position',
      ellipsis: true
    }]
  });
});

const data = [{
  name: 'Ted',
  surname: 'Smith',
  position: 'Java Developer',
  email: '[email protected]',
  company: 'Electrical Systems',
  age: 30,
  education: 'High School Of Cambridge',
  knownledge: 'Java, Ruby'
}, {
  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++'
}, {
  name: 'Sam',
  surname: 'Williams',
  position: 'Technical Analyst',
  email: '[email protected]',
  company: 'Airbus',
  age: 38,
  education: 'High School Of Cambridge',
  knownledge: ''
}, {
  name: 'Alexander',
  surname: 'Brown',
  position: 'Project Manager',
  email: '[email protected]',
  company: 'Renault',
  age: 24,
  education: 'High School Of Cambridge',
  knownledge: ''
}, {
  name: 'Nicholas',
  surname: 'Miller',
  position: 'Senior Software Engineer',
  email: '[email protected]',
  company: 'Adobe',
  age: 33,
  education: 'High School Of Cambridge',
  knownledge: 'Unix, C/C++'
}, {
  name: 'Andrew',
  surname: 'Thompson',
  position: 'Agile Project Manager',
  email: '[email protected]',
  company: 'Google',
  age: 28,
  education: 'High School Of...