Your search did not match any results.
Data Grid

Remote Virtual Scrolling

Documentation

With remote virtual scrolling, pages are loaded from the server when they enter the viewport. To enable this feature, set the scrolling.mode option to "virtual" and the remoteOperations option to true. The latter informs the widget that the server handles paging. In this demo, the server contains 1 000 000 records and returns 100 records per page. The page size is set using the paging.pageSize option. The larger it is, the fewer requests are sent to the server. To reduce the time required for rendering the loaded rows, set the scrolling.rowRenderingMode to "virtual"  — the DataGrid renders only rows that are in the viewport.

Copy to CodeSandBox
Apply
Reset
import React from 'react'; import DataGrid, { Scrolling, Paging, Column, HeaderFilter } from 'devextreme-react/data-grid'; import * as AspNetData from 'devextreme-aspnet-data-nojquery'; const dataSource = AspNetData.createStore({ key: 'Id', loadUrl: 'https://js.devexpress.com/Demos/WidgetsGalleryDataService/api/Sales' }); class App extends React.Component { render() { return ( <DataGrid elementAttr ={{ id: 'gridContainer' }} dataSource={dataSource} showBorders={true} remoteOperations={true} wordWrapEnabled={true} > <Scrolling mode={'virtual'} rowRenderingMode={'virtual'} /> <Paging pageSize={'100'} /> <HeaderFilter visible={true} allowSearch={true} /> <Column dataField={'Id'} width={'75'} /> <Column dataField={'StoreName'} caption={'Store'} width={'150'} /> <Column dataField={'ProductCategoryName'} caption={'Category'} width={'120'} /> <Column dataField={'ProductName'} caption={'Product'} /> <Column dataField={'DateKey'} caption={'Date'} dataType={'date'} format={'yyyy-MM-dd'} width={'100'} /> <Column dataField={'SalesAmount'} caption={'Amount'} format={'currency'} width={'100'}> <HeaderFilter groupInterval={1000} /> </Column> </DataGrid> ); } } export default App;
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/19.1.3/css/dx.common.css" /> <link rel="dx-theme" data-theme="generic.light" href="https://cdn3.devexpress.com/jslib/19.1.3/css/dx.light.css" /> <script src="https://unpkg.com/core-js@2.4.1/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> <link rel="stylesheet" type ="text/css" href ="styles.css" /> <script type="text/javascript"> System.import('./index.js'); </script> </head> <body class="dx-viewport"> <div class="demo-container"> <div id="app"></div> </div> </body> </html>
#gridContainer { height: 440px; }
System.config({ transpiler: 'plugin-babel', paths: { 'npm:': 'https://unpkg.com/' }, defaultExtension: 'js', meta: { 'devextreme-aspnet-data-nojquery': { 'esModule': true } }, map: { 'react': 'npm:react@16/umd/react.development.js', 'react-dom': 'npm:react-dom@16/umd/react-dom.development.js', 'prop-types': 'npm:prop-types/prop-types.js', 'devextreme': 'npm:devextreme@19.1', 'devextreme-react': 'npm:devextreme-react@19.1', 'devextreme-aspnet-data-nojquery': 'npm:devextreme-aspnet-data-nojquery@2.2.1', 'jszip': 'npm:jszip@3.1.3/dist/jszip.min.js', 'quill': 'npm:quill@1.3.6/dist/quill.js', 'devexpress-diagram': 'npm:devexpress-diagram', // SystemJS plugins 'plugin-babel': 'npm:systemjs-plugin-babel@0/plugin-babel.js', 'systemjs-babel-build': 'npm:systemjs-plugin-babel@0/systemjs-babel-browser.js' }, packages: { 'devextreme': { defaultExtension: 'js' }, 'devextreme-react': { main: 'index.js' } }, babelOptions: { sourceMaps: false, stage0: true, react: true } });