DevExtreme v23.2 is now available.

Explore our newest features/capabilities and share your thoughts with us.

Your search did not match any results.

Horizontal Virtual Scrolling

Horizontal virtual scrolling improves the rendering performance because the DataGrid only renders columns that are in the viewpoint. To enable this feature, set the scrolling.columnRenderingMode property to "virtual".

Backend API
$(() => { const columnCount = 500; const rowCount = 50; $('#grid').dxDataGrid({ dataSource: generateData(rowCount, columnCount), keyExpr: 'field1', columnWidth: 100, showBorders: true, scrolling: { columnRenderingMode: 'virtual', }, paging: { enabled: false, }, }); });
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <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" /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script>window.jQuery || document.write(decodeURIComponent('%3Cscript src="js/jquery.min.js"%3E%3C/script%3E'))</script> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/23.2.5/css/dx.light.css" /> <script src="js/dx.all.js"></script> <script src="data.js"></script> <script src="index.js"></script> <link rel="stylesheet" type="text/css" href="styles.css" /> </head> <body class="dx-viewport"> <div class="demo-container"> <div id="grid"></div> </div> </body> </html>
#grid { max-height: 440px; }
const generateData = function (rowCount, columnCount) { let i; let j; const items = []; for (i = 0; i < rowCount; i += 1) { const item = {}; for (j = 0; j < columnCount; j += 1) { item[`field${j + 1}`] = `${i + 1}-${j + 1}`; } items.push(item); } return items; };