React Data Grid - Overview (2024)

Material Light

React Data Grid - Overview (1) Material Blue Light

React Data Grid - Overview (2) Material Lime Light

React Data Grid - Overview (3) Material Orange Light

React Data Grid - Overview (4) Material Purple Light

React Data Grid - Overview (5) Material Teal Light

Material Dark

React Data Grid - Overview (6) Material Blue Dark

React Data Grid - Overview (7) Material Lime Dark

React Data Grid - Overview (8) Material Orange Dark

React Data Grid - Overview (9) Material Purple Dark

React Data Grid - Overview (10) Material Teal Dark

Material Light Compact

React Data Grid - Overview (11) Material Blue Light Compact

React Data Grid - Overview (12) Material Lime Light Compact

React Data Grid - Overview (13) Material Orange Light Compact

React Data Grid - Overview (14) Material Purple Light Compact

React Data Grid - Overview (15) Material Teal Light Compact

Material Dark Compact

React Data Grid - Overview (16) Material Blue Dark Compact

React Data Grid - Overview (17) Material Lime Dark Compact

React Data Grid - Overview (18) Material Orange Dark Compact

React Data Grid - Overview (19) Material Purple Dark Compact

React Data Grid - Overview (20) Material Teal Dark Compact

Generic Light

React Data Grid - Overview (21) Generic Light

React Data Grid - Overview (22) Carmine

React Data Grid - Overview (23) Soft Blue

React Data Grid - Overview (24) Green Mist

Generic Dark

React Data Grid - Overview (25) Generic Dark

React Data Grid - Overview (26) Contrast

React Data Grid - Overview (27) Dark Violet

React Data Grid - Overview (28) Dark Moon

Generic Light Compact

React Data Grid - Overview (29) Generic Light Compact

Generic Dark Compact

React Data Grid - Overview (30) Generic Dark Compact

React Data Grid - Overview (31) Contrast Dark Compact

Fluent Light

React Data Grid - Overview (32) Fluent Light

React Data Grid - Overview (33) Fluent SaaS Light

Fluent Dark

React Data Grid - Overview (34) Fluent Dark

React Data Grid - Overview (35) Fluent SaaS Dark

Fluent Light Compact

React Data Grid - Overview (36) Fluent Light Compact

React Data Grid - Overview (37) Fluent SaaS Light Compact

Fluent Dark Compact

React Data Grid - Overview (38) Fluent Dark Compact

React Data Grid - Overview (39) Fluent SaaS Dark Compact

Backend API

import React, { useCallback, useState } from 'react';import ODataStore from 'devextreme/data/odata/store';import DataGrid, { Column, DataGridTypes, Grouping, GroupPanel, Pager, Paging, SearchPanel,} from 'devextreme-react/data-grid';import DiscountCell from './DiscountCell.tsx';const pageSizes = [10, 25, 50, 100];const dataSourceOptions = { store: new ODataStore({ version: 2, url: 'https://js.devexpress.com/Demos/SalesViewer/odata/DaySaleDtoes', key: 'Id', beforeSend(request) { const year = new Date().getFullYear() - 1; request.params.startDate = `${year}-05-10`; request.params.endDate = `${year}-5-15`; }, }),};const App = () => { const [collapsed, setCollapsed] = useState(true); const onContentReady = useCallback((e: DataGridTypes.ContentReadyEvent) => { if (collapsed) { e.component.expandRow(['EnviroCare']); setCollapsed(false); } }, [collapsed]); return ( <DataGrid dataSource={dataSourceOptions} allowColumnReordering={true} rowAlternationEnabled={true} showBorders={true} width="100%" onContentReady={onContentReady} > <GroupPanel visible={true} /> <SearchPanel visible={true} highlightCaseSensitive={true} /> <Grouping autoExpandAll={false} /> <Column dataField="Product" groupIndex={0} /> <Column dataField="Amount" caption="Sale Amount" dataType="number" format="currency" alignment="right" /> <Column dataField="Discount" caption="Discount %" dataType="number" format="percent" alignment="right" allowGrouping={false} cellRender={DiscountCell} cssClass="bullet" /> <Column dataField="SaleDate" dataType="date" /> <Column dataField="Region" dataType="string" /> <Column dataField="Sector" dataType="string" /> <Column dataField="Channel" dataType="string" /> <Column dataField="Customer" dataType="string" width={150} /> <Pager allowedPageSizes={pageSizes} showPageSizeSelector={true} /> <Paging defaultPageSize={10} /> </DataGrid> );};export default App;

import React, { useCallback, useState } from 'react';import ODataStore from 'devextreme/data/odata/store';import DataGrid, { Column, Grouping, GroupPanel, Pager, Paging, SearchPanel,} from 'devextreme-react/data-grid';import DiscountCell from './DiscountCell.js';const pageSizes = [10, 25, 50, 100];const dataSourceOptions = { store: new ODataStore({ version: 2, url: 'https://js.devexpress.com/Demos/SalesViewer/odata/DaySaleDtoes', key: 'Id', beforeSend(request) { const year = new Date().getFullYear() - 1; request.params.startDate = `${year}-05-10`; request.params.endDate = `${year}-5-15`; }, }),};const App = () => { const [collapsed, setCollapsed] = useState(true); const onContentReady = useCallback( (e) => { if (collapsed) { e.component.expandRow(['EnviroCare']); setCollapsed(false); } }, [collapsed], ); return ( <DataGrid dataSource={dataSourceOptions} allowColumnReordering={true} rowAlternationEnabled={true} showBorders={true} width="100%" onContentReady={onContentReady} > <GroupPanel visible={true} /> <SearchPanel visible={true} highlightCaseSensitive={true} /> <Grouping autoExpandAll={false} /> <Column dataField="Product" groupIndex={0} /> <Column dataField="Amount" caption="Sale Amount" dataType="number" format="currency" alignment="right" /> <Column dataField="Discount" caption="Discount %" dataType="number" format="percent" alignment="right" allowGrouping={false} cellRender={DiscountCell} cssClass="bullet" /> <Column dataField="SaleDate" dataType="date" /> <Column dataField="Region" dataType="string" /> <Column dataField="Sector" dataType="string" /> <Column dataField="Channel" dataType="string" /> <Column dataField="Customer" dataType="string" width={150} /> <Pager allowedPageSizes={pageSizes} showPageSizeSelector={true} /> <Paging defaultPageSize={10} /> </DataGrid> );};export default App;

import React from 'react';import Bullet, { Font, Margin, Size, Tooltip,} from 'devextreme-react/bullet';import { DataGridTypes } from 'devextreme-react/data-grid';const customizeTooltip = (data) => ({ text: `${parseInt(data.value, 10)}%`,});const DiscountCell = (cellData: DataGridTypes.ColumnCellTemplateData) => ( <Bullet showTarget={false} showZeroLevel={true} value={cellData.value * 100} startScaleValue={0} endScaleValue={100} > <Size width={150} height={35} /> <Margin top={5} bottom={0} left={5} /> <Tooltip enabled={true} paddingTopBottom={2} zIndex={5} customizeTooltip={customizeTooltip} > <Font size={18} /> </Tooltip> </Bullet>);export default DiscountCell;

import React from 'react';import ReactDOM from 'react-dom';import App from './App.tsx';ReactDOM.render( <App />, document.getElementById('app'),);

window.exports = window.exports || {};window.config = { transpiler: 'ts', typescriptOptions: { module: 'system', emitDecoratorMetadata: true, experimentalDecorators: true, jsx: 'react', }, meta: { 'react': { 'esModule': true, }, 'typescript': { 'exports': 'ts', }, 'devextreme/time_zone_utils.js': { 'esModule': true, }, 'devextreme/localization.js': { 'esModule': true, }, 'devextreme/viz/palette.js': { 'esModule': true, }, }, paths: { 'npm:': 'https://unpkg.com/', }, defaultExtension: 'js', map: { 'ts': 'npm:plugin-typescript@4.2.4/lib/plugin.js', 'typescript': 'npm:typescript@4.2.4/lib/typescript.js', 'react': 'npm:react@17.0.2/umd/react.development.js', 'react-dom': 'npm:react-dom@17.0.2/umd/react-dom.development.js', 'prop-types': 'npm:prop-types@15.8.1/prop-types.js', 'rrule': 'npm:rrule@2.6.4/dist/es5/rrule.js', 'luxon': 'npm:luxon@1.28.1/build/global/luxon.min.js', 'es6-object-assign': 'npm:es6-object-assign@1.1.0', 'devextreme': 'npm:devextreme@23.2.5/cjs', 'devextreme-react': 'npm:devextreme-react@23.2.5/cjs', 'jszip': 'npm:jszip@3.10.1/dist/jszip.min.js', 'devextreme-quill': 'npm:devextreme-quill@1.6.4/dist/dx-quill.min.js', 'devexpress-diagram': 'npm:devexpress-diagram@2.2.5/dist/dx-diagram.js', 'devexpress-gantt': 'npm:devexpress-gantt@4.1.51/dist/dx-gantt.js', '@devextreme/runtime': 'npm:@devextreme/runtime@3.0.12', 'inferno': 'npm:inferno@7.4.11/dist/inferno.min.js', 'inferno-compat': 'npm:inferno-compat/dist/inferno-compat.min.js', 'inferno-create-element': 'npm:inferno-create-element@7.4.11/dist/inferno-create-element.min.js', 'inferno-dom': 'npm:inferno-dom/dist/inferno-dom.min.js', 'inferno-hydrate': 'npm:inferno-hydrate@7.4.11/dist/inferno-hydrate.min.js', 'inferno-clone-vnode': 'npm:inferno-clone-vnode/dist/inferno-clone-vnode.min.js', 'inferno-create-class': 'npm:inferno-create-class/dist/inferno-create-class.min.js', 'inferno-extras': 'npm:inferno-extras/dist/inferno-extras.min.js', 'devextreme-cldr-data': 'npm:devextreme-cldr-data@1.0.3', // SystemJS plugins 'plugin-babel': 'npm:systemjs-plugin-babel@0.0.25/plugin-babel.js', 'systemjs-babel-build': 'npm:systemjs-plugin-babel@0.0.25/systemjs-babel-browser.js', // Prettier 'prettier/standalone': 'npm:prettier@2.8.4/standalone.js', 'prettier/parser-html': 'npm:prettier@2.8.4/parser-html.js', }, packages: { 'devextreme': { defaultExtension: 'js', }, 'devextreme-react': { main: 'index.js', }, 'devextreme/events/utils': { main: 'index', }, 'devextreme/localization/messages': { format: 'json', defaultExtension: '', }, 'devextreme/events': { main: 'index', }, 'es6-object-assign': { main: './index.js', defaultExtension: 'js', }, }, packageConfigPaths: [ 'npm:@devextreme/*/package.json', 'npm:@devextreme/runtime@3.0.12/inferno/package.json', ], babelOptions: { sourceMaps: false, stage0: true, react: true, },};System.config(window.config);

import React from 'react';import Bullet, { Font, Margin, Size, Tooltip,} from 'devextreme-react/bullet';const customizeTooltip = (data) => ({ text: `${parseInt(data.value, 10)}%`,});const DiscountCell = (cellData) => ( <Bullet showTarget={false} showZeroLevel={true} value={cellData.value * 100} startScaleValue={0} endScaleValue={100} > <Size width={150} height={35} /> <Margin top={5} bottom={0} left={5} /> <Tooltip enabled={true} paddingTopBottom={2} zIndex={5} customizeTooltip={customizeTooltip} > <Font size={18} /> </Tooltip> </Bullet>);export default DiscountCell;

import React from 'react';import ReactDOM from 'react-dom';import App from './App.js';ReactDOM.render(<App />, document.getElementById('app'));

<!DOCTYPE html><html> <head> <title>DevExtreme Demo</title> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" /> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/23.2.5/css/dx.light.css" /> <link rel="stylesheet" type="text/css" href="styles.css" /> <script src="https://unpkg.com/core-js@2.6.12/client/shim.min.js"></script> <script src="https://unpkg.com/systemjs@0.21.3/dist/system.js"></script> <script type="text/javascript" src="config.js"></script> <script type="text/javascript"> System.import("./index.tsx"); </script> </head> <body class="dx-viewport"> <div class="demo-container"> <div id="app"></div> </div> </body></html>

.dx-datagrid .dx-data-row > td.bullet { padding-top: 0; padding-bottom: 0;}

React Data Grid - Overview (2024)

FAQs

React Data Grid - Overview? ›

The React Data Grid supports virtualization of both column and row data. This feature boosts the performance of the component when displaying large data tables as it dynamically renders only a portion of the rows and the columns.

What is the use of React data grid? ›

The React Data Grid is a feature-rich grid component for displaying data in a tabular format. Its wide range of functionalities includes data binding, editing, Excel-like filtering, custom sorting, aggregating rows, selection, and support for Excel, CSV, and PDF formats.

What is the grid concept in React? ›

The grid creates visual consistency between layouts while allowing flexibility across a wide variety of designs. Material Design's responsive UI is based on a 12-column grid layout. The Grid component shouldn't be confused with a data grid; it is closer to a layout grid. For a data grid head to the DataGrid component.

What is the difference between data table and data grid in React? ›

In its most basic form, a data grid could be seen as a table - data represented in rows and columns. Differences start already at basic functionality, like scrolling. While a table would not offer much more than a sticky header, usually showing the column definitions, the data grid can be much more sophisticated.

What is the best Datagrid in React? ›

AG-Grid and React Table are excellent choices for complex and feature-rich data tables, while Material-UI Table integrates seamlessly into Material-UI projects. Griddle and React Data Table Component are lightweight options suitable for smaller projects with simpler requirements.

What is the difference between stack and grid in React? ›

The Stack component manages the layout of its immediate children along the vertical or horizontal axis, with optional spacing and dividers between each child. Stack is ideal for one-dimensional layouts, while Grid is preferable when you need both vertical and horizontal arrangement.

How to use React Grid Layout? ›

Use ReactGridLayout like any other component. The following example below will produce a grid with three items where: users will not be able to drag or resize item a. item b will be restricted to a minimum width of 2 grid blocks and a maximum width of 4 grid blocks.

Does React have a grid system? ›

react-grid-system provides a responsive grid for React inspired by Bootstrap. Moreover, it has various additional powerful features, such as setting breakpoints and gutter widths through React's context. Three components are provided for creating responsive grids: Container , Row , and Col .

How to make React grid responsive? ›

In our previous article, Creating a Responsive Layout in React, we started by learning how to setup a basic responsive layout in our React application using Flexbox and media queries. We used a React Hooks npm package to help with breakpoints and another package for helping with responsive images (picture tag).

Why use grid instead of table? ›

Data grids are more flexible than tables, they can be resized and rearranged without breaking the layout. They are also responsive, meaning they will adapt to the screen size of the device they are being viewed on.

What is the equivalent of Datatables in react? ›

React-datatable is a component which provide ability to create multifunctional table using single component like jQuery Datatable. It's fully customizable and easy to integrate in any react component.

What is the difference between DataGrid and data grid? ›

A Grid is a control for laying out other controls on the form (or page). A DataGrid is a control for displaying tabular data as read from a database for example.

Is mui datagrid free? ›

For instance @mui/x-data-grid is an MIT License (free) while @mui/x-data-grid-pro is a Commercial License.

How do you create a table grid in React? ›

Getting Started with React Data Grid

To get started with the React Data Grid, first you need to install the Ignite UI for React package. When installing the React grid package, the core, inputs and layout packages must also be installed.

What is the use of in memory data grid? ›

The objective of In-Memory Data Grids (IMDG) is to ensure exceptionally high data availability by storing it in memory in a highly distributed and parallelized manner. By loading terabytes of data into memory, IMDGs can effectively handle most of the requirements for processing Big Data today.

What is grid functionality? ›

Grids can be used to lay out major page areas or small user interface elements. A grid can be compared to a set of horizontal and vertical lines defining columns and rows. Elements can be placed onto the grid within these column and row lines.

Top Articles
Latest Posts
Article information

Author: Aracelis Kilback

Last Updated:

Views: 6117

Rating: 4.3 / 5 (44 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Aracelis Kilback

Birthday: 1994-11-22

Address: Apt. 895 30151 Green Plain, Lake Mariela, RI 98141

Phone: +5992291857476

Job: Legal Officer

Hobby: LARPing, role-playing games, Slacklining, Reading, Inline skating, Brazilian jiu-jitsu, Dance

Introduction: My name is Aracelis Kilback, I am a nice, gentle, agreeable, joyous, attractive, combative, gifted person who loves writing and wants to share my knowledge and understanding with you.