| Quick Start Guide | |
|---|---|
| What You Will Need |
|
| Controls Referenced | |
| Tutorial Concept | Enable fast sorting, filtering, and responsive layouts with a smart JavaScript Data Table component to facilitate cleaner, more interactive data experiences. |
Tables are an essential part of modern web applications because they provide one of the most efficient ways to present, compare, and organize large datasets. While plain HTML tables can handle simple use cases, they quickly become difficult to manage when your project demands interactivity, performance, or flexibility.
At that point, developers face a choice: they can either build and maintain custom table logic, writing all the sorting, filtering, and editing features themselves, or they can use a dedicated JavaScript data grid that already solves these challenges. The first option often leads to increased maintenance and distraction from the project's core goals. The second option leverages proven, optimized solutions built for scalability and enterprise use.
Data tables are used everywhere, from dashboards and financial reports to sales tracking tools and spreadsheets (like web apps). With this widespread demand, the ecosystem of JavaScript UI components has grown to include specialized, high-performance grids designed to handle complex data scenarios.
Today's smart JavaScript data grids do far more than display information. They provide advanced functionality out of the box, such as data binding, virtualization, sorting, filtering, grouping, and flexible editing options, all with minimal setup.
In this article, we'll look at what makes a data grid "smart," review an open-source example, and show how to build an enterprise-grade solution using Wijmo's FlexGrid, a powerful JavaScript data grid from MESCIUS. We'll cover the following sections:
- Table Capabilities
- Using JavaScript Data Tables
- Implementing a JavaScript App
- Alternatives to Customizing Open Source JavaScript Data Tables
- A JavaScript Smart Data Table with Wijmo FlexGrid
Ready to get started? Download Wijmo Today!
Table Capabilities
How smart can a smart table be? Just adding a few features to a plain HTML table is not enough. Current products in the market can vary greatly, but there are some key features that people expect to see when they look for a smart data table:
- Data features:
- Import data from and export to various sources, including local files (such as Excel import and export), databases, and APIs
- Searching, filtering, and sorting options
- Load and display large datasets with pagination
- UI features:
- Showing and hiding columns
- Inline editing
- Responsiveness: built-in support for desktop and mobile
- Resizable columns to accommodate long data points or multiline comments
- Horizontal and vertical scroll support
- Data validation and visualizations, such as sparklines
Some frameworks have built-in implementations with a few features, but you have to code advanced features requiring unplanned development effort.
Using JavaScript Data Tables
When you're building a web app with plain JavaScript (rather than a framework-specific layer), you still face the table challenge: displaying, sorting, filtering, and managing tabular data in ways that go beyond a static HTML table. Fortunately, the open-source ecosystem in JavaScript offers mature table/grid libraries that handle most of the heavy lifting.
Here are some popular open-source JavaScript table/grid solutions worth evaluating:
- DataTables — A long-time favorite for enhancing existing HTML <table> elements: adds searching, pagination, multi-column sorting, framework integrations, and lots of extensions.
- Grid.js — A lightweight, framework-agnostic JavaScript table plugin that works with vanilla JavaScript (or frameworks) and supports async data, custom cell rendering, sorting, pagination, and extension via a pipeline.
- Tabulator — A fully featured JS data-grid library offering virtual DOM rendering for large datasets, exporting (CSV/XLSX), tree/hierarchical views, touch-support, persistent state, and spreadsheet-style behavior.
When selecting a JavaScript table library, keep these questions in mind:
- Does it support large datasets (via virtualization or paging) to ensure acceptable performance?
- Are the sorting, filtering, selection, and editing features you need built in or easy to extend?
- Is the API intuitive for vanilla JavaScript (rather than requiring you to adopt a framework)?
- How good is the documentation, community support, and plugin/extension ecosystem?
- Does the library integrate easily with your data source (JSON, REST, streaming) and your UI design/style?
In the next section, we'll evaluate one of these libraries in more detail, and then show how you can implement an enterprise-grade, smart JavaScript data table using FlexGrid from Wijmo, a high-performance solution with advanced features built for production use.
Implementing a JavaScript App with Grid.js
The different open-source projects listed above have advantages and disadvantages. Depending on which features you're looking for, some of these components will score higher than others, so let's just demonstrate one of them.
We'll implement a new JavaScript application with a Grid.js table, an open-source component that closely resembles the smart data table that will be implemented in the end.
First, create a new file, which we'll call index.html, and we'll reference the required Grid.js files that we'll need via their CDN:
<script src="https://cdn.jsdelivr.net/npm/gridjs/dist/gridjs.umd.js"></script>
<link href="https://cdn.jsdelivr.net/npm/gridjs/dist/theme/mermaid.min.css" rel="stylesheet" />
Then, inside the <body> tag, we'll add an element to which we can bind our data table, as well as a pair of <script> tags which we'll use to generate some data:
<div id="datatable"></div>
<script>
function getData() {
var data = [];
var countries = ['US', 'UK', 'Germany', 'France', 'Mexico', 'Canada', 'China', 'Japan', 'South Korea', 'India']
for(var i = 0; i < 10; i++) {
data.push({
id: i,
country: countries[i],
sales: Math.round(Math.random() * 10000),
downloads: Math.round(Math.random() * 25000),
expenses: Math.round(Math.random() * 1500)
});
}
return data;
}
</script>
The getData() function creates an array called data and then uses a for() loop to generate data objects, which are pushed onto the array. Then, we simply return the array.
Now, inside the <script> tags, we'll add the code required to add a Grid.js data table to the application and bind it to our datatable element:
<script>
function getData() {
var data = [];
var countries = ['US', 'UK', 'Germany', 'France', 'Mexico', 'Canada', 'China', 'Japan', 'South Korea', 'India']
for(var i = 0; i < 10; i++) {
data.push({
id: i,
country: countries[i],
sales: Math.round(Math.random() * 10000),
downloads: Math.round(Math.random() * 25000),
expenses: Math.round(Math.random() * 1500)
});
}
return data;
}
var dataTable = new gridjs.Grid({
columns: ['ID', 'Country', 'Sales', 'Downloads', 'Expenses'],
data: getData()
}).render(document.getElementById('datatable'));
</script>
Now, if we run the application, we'll see the Grid.js data table in the browser:

To demonstrate some of the component features of this open-source grid, we'll also show off how you can add formatting to cells, both to change the content of what's being displayed and to style the contents of the cells.
Inside the data grid initialization, we'll alter how we set up the columns property so that we can modify how the Sales and Expenses columns display their data, as well as add some conditional formatting to the Downloads column.
Update the dataTable variable that we created so that it looks as follows:
var dataTable = new gridjs.Grid({
columns: [
'ID',
'Country',
{
name: 'Sales',
formatter: (cell) => `$${cell}`
},
{
name: 'Downloads',
formatter: (cell) => {
if(cell < 10000) {
return gridjs.html(`<b style="color: red">${cell}</b>`);
} else if(cell > 17500) {
return gridjs.html(`<b style="color: green">${cell}</b>`);
}
return gridjs.html(`${cell}`);
}
},
{
name: 'Expenses',
formatter: (cell) => `$${cell}`
}
],
data: getData()
}).render(document.getElementById('datatable'));
The columns array accepts both strings and objects, so we're creating objects for the Sales, Downloads, and Expenses columns. We give each of them a name, and then we use the formatter property to create an array that can be used to style that column. For Sales and Expenses, we're adding a dollar sign ($) to indicate that these are currency values. For Downloads, we're checking the cell value. Any cell with a value less than 10,000 gets bolded and colored red, while a value greater than 17,500 gets bolded and colored green. Now, when we run the application, we'll see the following in the browser:

Now we have a data table that can both add formatting and do it conditionally based on cell values. This is great; however, there are still some problems that Grid.js, as well as the other open source options we've highlighted, share.
First, there's the problem of editing. While you can do things like sorting and formatting with these grids, an important feature of a smart data table is the ability to edit the contents of the grid. These are great for viewing data, but if you want to give your users the power of a true smart data table, they'll need to be able to work with the data, not just view it.
Second, modifying or adding a few lines to customize a single data table doesn't seem to be a big problem. However, when you have different smart tables implemented on numerous pages across multiple projects, it becomes evident that your organization needs a more robust and consistent solution.
Alternatives to Customizing Open-Source JavaScript Data Tables
For everyday use, open-source smart table components are sufficient to fulfill basic needs and do the work. However, if your company is developing first-rate, enterprise-grade applications, you should consider more professional products that offer support for multiple JavaScript frameworks and cover a comprehensive set of functionalities.
MESCIUS offers several data table products that can be easily implemented in a JavaScript app with just a few lines of code. These products are packed with a rich set of features that we would otherwise have to customize, just like we did previously with the open-source component.
Let's explore some highlights from different lightweight smart table products provided by MESCIUS, including SpreadJS, DataViewJS, and Wijmo's FlexGrid.
SpreadJS
SpreadJS is the World's best-selling JavaScript Spreadsheet with over 450 Excel functions. With SpreadJS, you can quickly deliver Excel-like spreadsheet experiences with zero dependencies on Excel, along with full support for React, Vue, Angular, and TypeScript.
For standard spreadsheet scenarios, SpreadJS enables you to create financial reports and dashboards, budgeting and forecasting models, science lab notebooks, and scientific, engineering, healthcare, education, and other similar JavaScript applications.
For more advanced spreadsheet use cases, SpreadJS allows you to create custom spreadsheets, advanced grids, dashboards, reports, and data input forms with the comprehensive API. Powered by a high-speed calculation engine, SpreadJS enables the most complex calculations.
SpreadJS enables integration by importing and exporting features that work seamlessly with the most demanding Excel spreadsheets.
DataViewJS
DataViewJS is a data grid platform focused on advanced data presentation. It goes beyond traditional tabular displays, providing several presentation views, including tree, card, masonry, trellis, timeline, Gantt, calendar, and grid.
DataViewJS allows you to change layouts freely with a single line of code and has full support for Angular, React, and Vue.js.
Wijmo FlexGrid
FlexGrid is part of the Wijmo product family, which includes JavaScript/HTML5 UI components, such as FlexChart, Input, PivotChart, FinancialChart, ReportViewer, and more. FlexGrid has full support for Angular, React, Vue, Nuxt.js, Next.js, and Svelte.
Its lightning speed and extensibility make Wijmo's FlexGrid the ultimate JavaScript smart data grid. FlexGrid's small footprint improves performance and reduces load time by keeping your web applications compact.
You can take advantage of the Excel-like features of FlexGrid, such as data aggregation, cell merging, star sizing, and cell freezing. Also, Cell Templates provide limitless templates with support for declarative markup and binding expressions.
Each of these MESCIUS products is lightweight and works with virtualization, meaning they keep running at high performance even when connected to massive data sources.
A JavaScript Smart Data Table with Wijmo FlexGrid
Let's demonstrate how to implement a Wijmo FlexGrid smart JavaScript data table in the same JavaScript app we previously built.
Just like with Grid.js, we'll be using Wijmo's CDN to import the required files:
<link href="https://cdn.mescius.com/wijmo/5.latest/styles/wijmo.min.css" rel="stylesheet"/>
<script src="https://cdn.mescius.com/wijmo/5.latest/controls/wijmo.min.js"></script>
<script src="https://cdn.mescius.com/wijmo/5.latest/controls/wijmo.grid.min.js"></script>
These imports are Wijmo's core CSS file, its core JavaScript file, and then FlexGrid's JavaScript file.
Then, we just need to replace Grid.js' initialization inside the <script> tag with Wijmo FlexGrid's initialization:
var dataTable = new wijmo.grid.FlexGrid('#datatable', {
itemsSource: getData()
});
Now, when we run the application, we'll see the FlexGrid in the browser:

The first thing you'll notice is the highlighted cell; Wijmo's FlexGrid allows you to easily select both individual cells and cell ranges, and comes with editing out of the box. Simply select a cell and start typing to update the cell value:

You can also see in the header column an editing icon displayed to show which row we're currently working on.
Wijmo's FlexGrid also comes with several features that are available without requiring any implementation. Your users will be able to sort columns by simply clicking on the column header, and they'll also be able to reorder the layout of their columns by dragging and dropping them where they'd like:

Custom and Conditional Formatting
Now, like with Grid.js, we'll apply some formatting to some of these columns. First, we're going to add some formatting to the Sales and Expenses columns:
var dataTable = new wijmo.grid.FlexGrid('#datatable', {
autoGenerateColumns: false,
columns: [
{ header: 'ID', binding: 'id' },
{ header: 'Country', binding: 'country' },
{ header: 'Sales', binding: 'sales', format: 'c2' },
{ header: 'Downloads', binding: 'downloads' },
{ header: 'Expenses', binding: 'expenses', format: 'c2' }
],
itemsSource: getData()
});
Like with open-source grids, we're binding the objects for our columns to a columns array. However, unlike the others, we can easily format our data with strings; in this case, the string 'c2'. The 'c' stands for currency, while the numeric value is the number of decimal places we're going to display.
Currency is not the only formatting type available in FlexGrid; there are also percentage, numeric, float, and more.
Next, we'll format the Downloads column in the same style as we did with Grid.js:
var dataTable = new wijmo.grid.FlexGrid('#datatable', {
autoGenerateColumns: false,
columns: [
{ header: 'ID', binding: 'id' },
{ header: 'Country', binding: 'country' },
{ header: 'Sales', binding: 'sales', format: 'c2' },
{ header: 'Downloads', binding: 'downloads' },
{ header: 'Expenses', binding: 'expenses', format: 'c2' }
],
itemsSource: getData(),
itemFormatter: (panel, r, c, cell) => {
if(c == 3 && panel.getCellData(r, c) < 10000) {
cell.style.color = 'red';
cell.style.fontWeight = 'bold';
} else if(c == 3 && panel.getCellData(r, c) > 17500) {
cell.style.color = 'green';
cell.style.fontWeight = 'bold';
}
}
});
As you can see, we're using a property called itemFormatter, which accepts a function with four arguments: panel, c, r, and cell. For the purposes of this sample, we only need to worry about c and r, which represent the column and row value, while cell is the HTMLElement of the cell we're working in.
All we're doing here is checking to see if we're in the Downloads column (which would be column 3, since arrays start at index 0), and we're checking the value against our preset values: in this case, 10,000 and 17,500. If they are, we simply set the appropriate CSS values based on where they fall within our conditional styling guidelines.
Now, when we run the application, we should see the following:

The last thing that we'll do is give users the ability to export their data table to an XLSX file. To do so, we'll need to import the required file from the CDN that will allow us to export our data, as well as add a button and bind a method to its click event:
<script src="https://cdn.mescius.com/wijmo/5.latest/controls/wijmo.grid.xlsx.min.js"></script>
...
<button id="saveXlsx" type="button" class="btn btn-primary" onclick="exportXlsx()">Export</button>
Then, we'll create the exportXlsx() method that will actually handle the export:
function exportXlsx() {
var workBook = wijmo.grid.xlsx.FlexGridXlsxConverter.save(dataTable, {
includeColumnHeaders: true,
includeStyles: true
}, 'FlexGrid.xlsx');
}
Now, when we run the application, we'll see the following:

And when we click the Export button, the data table will get exported into an XLSX file, which, when opened, should look like so:

This demo barely scratches the surface of the FlexGrid component. You can explore the MESCIUS page for the Wijmo family of JavaScript UI Components and Tools to find complete documentation, demos, and examples written for Angular, React, and Vue.
Ready to check it out? Download Wijmo Today!
Conclusion
You can create and use JavaScript-based smart data tables in many different ways. Since JavaScript is the foundation of most modern web frameworks, developers have the freedom to choose between lightweight libraries, UI component suites, or fully featured grid controls. However, not all solutions are equal, and some require extensive manual configuration and customization to achieve the desired level of interactivity or performance. Often, you don't realize how much work is involved until you've already invested significant development time.
There are many free and open-source table libraries available that are great for common data display needs. We reviewed several of these options earlier in this article. However, for business or enterprise-grade applications, developers shouldn't have to build complex functionality from scratch or maintain endless workarounds to meet production requirements. That's where a commercial, professionally supported component suite like Wijmo provides real value and long-term efficiency.
Wijmo's FlexGrid is built with a framework-agnostic JavaScript core that delivers consistent, high-performance behavior across the entire ecosystem. It includes full support for popular frameworks like Angular, React, and Vue, while maintaining the same underlying grid engine and API. This consistency gives developers the freedom to choose their preferred framework — or even migrate between them — without needing to rebuild their data grid from scratch. The result is faster development, improved maintainability, and a greater return on investment for your organization.