Cheetah Grid
The fastest open-source data table for web.
README
Cheetah Grid
The fastest open-source data table for web.
Downloading Cheetah Grid
Using Cheetah Grid with a CDN
- ``` html
- <script src="https://unpkg.com/cheetah-grid@1.8"></script>
- ```
Downloading Cheetah Grid using npm
- ```sh
- npm install -S cheetah-grid
- ```
- ``` js
- import * as cheetahGrid from "cheetah-grid";
- // or
- const cheetahGrid = require("cheetah-grid");
- ```
Downloading Cheetah Grid source code
SourceMap
Downloading Cheetah Grid using GitHub
git clone
- ``` sh
- git clone https://github.com/future-architect/cheetah-grid.git
- ```
npm install & build
- ``` sh
- npm install
- npm run build
- ```
built file is created in the ./packages/cheetah-grid/dist directory
Usage
Example for basic usage
- ``` html
- <div id="sample" style="height: 300px; border: solid 1px #ddd;"></div>
- <script>
- // initialize
- const grid = new cheetahGrid.ListGrid({
- // Parent element on which to place the grid
- parentElement: document.querySelector("#sample"),
- // Header definition
- header: [
- {
- field: "check",
- caption: "",
- width: 50,
- columnType: "check",
- action: "check",
- },
- { field: "personid", caption: "ID", width: 100 },
- { field: "fname", caption: "First Name", width: 200 },
- { field: "lname", caption: "Last Name", width: 200 },
- { field: "email", caption: "Email", width: 250 },
- ],
- // Array data to be displayed on the grid
- records,
- // Column fixed position
- frozenColCount: 2,
- });
- </script>
- ```
Please refer to the documents for details
Using the Vue Component of Cheetah Grid
Please refer to the [vue-cheetah-grid](https://www.npmjs.com/package/vue-cheetah-grid)
>
Using the React Component of Cheetah Grid
Please refer to the [react-cheetah-grid](https://www.npmjs.com/package/react-cheetah-grid)
Definition of columns and headers
The header property, the property of cheetahGrid.ListGrid, decides the behave and appearance of columns and header cells.
We can set this property by constructor arguments or instance property.