Top Related Projects
A lightning fast JavaScript grid/spreadsheet
The best JavaScript Data Table for building Enterprise Applications. Supports React / Angular / Vue / Plain JavaScript.
JavaScript data grid with a spreadsheet look & feel. Works with React, Angular, and Vue. Supported by the Handsontable team ⚡
Quick Overview
SlickGrid is a powerful and customizable JavaScript grid/spreadsheet component. It's designed for handling large datasets with high performance, offering features like virtual rendering and frozen columns. SlickGrid is particularly useful for applications requiring advanced data manipulation and display capabilities.
Pros
- Excellent performance with large datasets (100,000+ rows)
- Highly customizable with numerous plugins and extensions
- Supports virtual rendering for efficient memory usage
- Provides advanced features like frozen columns and rows
Cons
- Steep learning curve due to its complexity
- Documentation can be outdated or incomplete
- Less active development compared to newer grid libraries
- May require additional effort for modern framework integration
Code Examples
- Basic grid initialization:
var grid;
var columns = [
{ id: "title", name: "Title", field: "title" },
{ id: "duration", name: "Duration", field: "duration" }
];
var options = {
enableCellNavigation: true,
enableColumnReorder: false
};
$(function () {
var data = [];
for (var i = 0; i < 500; i++) {
data[i] = {
title: "Task " + i,
duration: "5 days"
};
}
grid = new Slick.Grid("#myGrid", data, columns, options);
});
- Adding a custom formatter:
function percentCompleteFormatter(row, cell, value, columnDef, dataContext) {
if (value == null || value === "") {
return "-";
} else if (value < 50) {
return "<span style='color:red;font-weight:bold;'>" + value + "%</span>";
} else {
return "<span style='color:green'>" + value + "%</span>";
}
}
var columns = [
{ id: "percentComplete", name: "% Complete", field: "percentComplete", formatter: percentCompleteFormatter }
];
- Implementing row selection:
var options = {
enableCellNavigation: true,
enableColumnReorder: false,
multiSelect: false
};
grid = new Slick.Grid("#myGrid", data, columns, options);
var selectedRowIds = [];
grid.setSelectionModel(new Slick.RowSelectionModel());
grid.onSelectedRowsChanged.subscribe(function(e, args) {
selectedRowIds = args.rows;
});
Getting Started
- Include SlickGrid files in your HTML:
<link rel="stylesheet" href="slick.grid.css" type="text/css"/>
<script src="jquery-1.11.2.min.js"></script>
<script src="jquery.event.drag-2.3.0.js"></script>
<script src="slick.core.js"></script>
<script src="slick.grid.js"></script>
- Create a container for the grid:
<div id="myGrid" style="width:600px;height:500px;"></div>
- Initialize the grid with data, columns, and options:
var grid;
var data = [/* your data array */];
var columns = [/* your column definitions */];
var options = {/* your grid options */};
$(function () {
grid = new Slick.Grid("#myGrid", data, columns, options);
});
Competitor Comparisons
A lightning fast JavaScript grid/spreadsheet
Pros of SlickGrid (6pac)
- Actively maintained with regular updates and bug fixes
- Improved browser compatibility, including better support for modern browsers
- Enhanced performance optimizations for handling large datasets
Cons of SlickGrid (6pac)
- Some API changes may require updates to existing code
- Slightly larger file size due to additional features and improvements
Code Comparison
SlickGrid (mleibman):
grid = new Slick.Grid("#myGrid", data, columns, options);
grid.setSelectionModel(new Slick.CellSelectionModel());
SlickGrid (6pac):
grid = new Slick.Grid("#myGrid", data, columns, options);
grid.setSelectionModel(new Slick.CellSelectionModel());
grid.registerPlugin(new Slick.AutoTooltips());
The core functionality remains similar, but SlickGrid (6pac) offers additional plugins and features that can be easily integrated.
Summary
SlickGrid (6pac) is a fork of the original SlickGrid project, maintaining its core functionality while providing active development, improved browser support, and performance enhancements. While it may require some code updates and has a slightly larger file size, the benefits of ongoing maintenance and additional features make it a compelling choice for many developers. The basic usage remains similar, allowing for a relatively smooth transition between the two versions.
The best JavaScript Data Table for building Enterprise Applications. Supports React / Angular / Vue / Plain JavaScript.
Pros of ag-grid
- More active development and frequent updates
- Extensive documentation and community support
- Rich set of features, including enterprise-level functionality
Cons of ag-grid
- Steeper learning curve due to more complex API
- Larger file size and potential performance impact for simpler use cases
Code Comparison
SlickGrid:
var grid = new Slick.Grid("#myGrid", data, columns, options);
grid.onCellChange.subscribe(function (e, args) {
// Handle cell change
});
ag-grid:
var gridOptions = {
columnDefs: columnDefs,
rowData: rowData,
onCellValueChanged: function(event) {
// Handle cell change
}
};
new agGrid.Grid(gridDiv, gridOptions);
Key Differences
- ag-grid offers more built-in features and customization options
- SlickGrid has a simpler API and may be easier to implement for basic grids
- ag-grid provides better support for modern frameworks and TypeScript
- SlickGrid is lighter-weight and may perform better for large datasets with simple requirements
Use Cases
- Choose ag-grid for complex enterprise applications with advanced grid requirements
- Consider SlickGrid for simpler projects or when working with large datasets and basic functionality
JavaScript data grid with a spreadsheet look & feel. Works with React, Angular, and Vue. Supported by the Handsontable team ⚡
Pros of Handsontable
- More feature-rich out of the box, including advanced functionalities like filtering, sorting, and validation
- Better documentation and community support
- Regular updates and active maintenance
Cons of Handsontable
- Heavier and potentially slower for very large datasets
- Commercial license required for some features and use cases
Code Comparison
SlickGrid:
var grid = new Slick.Grid("#myGrid", data, columns, options);
grid.onCellChange.subscribe(function (e, args) {
// Handle cell change
});
Handsontable:
var hot = new Handsontable(container, {
data: data,
columns: columns,
afterChange: function (changes, source) {
// Handle cell change
}
});
Both libraries offer similar basic functionality for creating data grids, but Handsontable provides a more modern API and additional built-in features. SlickGrid focuses on performance for large datasets, while Handsontable offers a broader range of features and easier customization. The choice between the two depends on specific project requirements, such as dataset size, needed features, and licensing considerations.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Welcome to SlickGrid
Find documentation and examples in the wiki.
UPDATE: March 5th, 2014 - I have too many things going on in my life right now to really give SlickGrid support and development the time and attention it deserves. I am not stopping it, but I will most likely be unresponsive for some time. Sorry.
UPDATE: This repo hasn't been updated in a while. https://github.com/6pac/SlickGrid/wiki seems to be the most active fork at the moment.
SlickGrid is an advanced JavaScript grid/spreadsheet component
Some highlights:
- Adaptive virtual scrolling (handle hundreds of thousands of rows with extreme responsiveness)
- Extremely fast rendering speed
- Supports jQuery UI Themes
- Background post-rendering for richer cells
- Configurable & customizable
- Full keyboard navigation
- Column resize/reorder/show/hide
- Column autosizing & force-fit
- Pluggable cell formatters & editors
- Support for editing and creating new rows.
- Grouping, filtering, custom aggregators, and more!
- Advanced detached & multi-field editors with undo/redo support.
- âGlobalEditorLockâ to manage concurrent edits in cases where multiple Views on a page can edit the same data.
- Support for millions of rows
Top Related Projects
A lightning fast JavaScript grid/spreadsheet
The best JavaScript Data Table for building Enterprise Applications. Supports React / Angular / Vue / Plain JavaScript.
JavaScript data grid with a spreadsheet look & feel. Works with React, Angular, and Vue. Supported by the Handsontable team ⚡
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot