Your search did not match any results.
Data Grid

Remote Grouping

Remote (server-side) operations can boost the DataGrid's performance on large datasets. In this demo, the DataGrid works with a million records seamlessly because they are processed on the server.

To notify the DataGrid that it works with a pre-processed dataset, set the remoteOperations option to true.

You can also specify options that allow the widget to load data on demand to reduce the amount of transmitted data. Set the grouping.autoExpandAll option to false to collapse all the groups at startup. Data for each group is loaded only when the user expands the group. Enable the "virtual" scrolling.mode to load only those records that come into the viewport when the grid is scrolled vertically.

The DataGrid communicates with the server according to a protocol. Refer to the Load Data article for information on it.

@(Html.DevExtreme().DataGrid<DevExtreme.MVC.Demos.Models.DataService.Sale>() .ID("gridContainer") .DataSource(d => d.RemoteController() .LoadUrl("https://js.devexpress.com/Demos/WidgetsGalleryDataService/api/Sales") .Key("Id") ) .RemoteOperations(ro => ro.GroupPaging(true)) .Scrolling(s => s .Mode(GridScrollingMode.Virtual) ) .GroupPanel(groupPanel => groupPanel.Visible(true)) .Grouping(grouping => grouping.AutoExpandAll(false)) .WordWrapEnabled(true) .ShowBorders(true) .Columns(columns => { columns.AddFor(m => m.Id) .Width(75); columns.AddFor(m => m.ProductSubcategoryName) .Width(150); columns.AddFor(m => m.StoreName) .GroupIndex(0) .Width(150); columns.AddFor(m => m.ProductCategoryName) .GroupIndex(1) .Width(120); columns.AddFor(m => m.ProductName); columns.AddFor(m => m.DateKey) .Format("yyyy-MM-dd") .Width(100); columns.AddFor(m => m.SalesAmount) .Format("currency") .HeaderFilter(h => h.GroupInterval(1000)) .Width(100); }) .Summary(s => s.GroupItems(items => { items.AddFor(m => m.Id) .SummaryType(SummaryType.Count); })) )
using DevExtreme.MVC.Demos.Models; using DevExtreme.MVC.Demos.Models.DataGrid; using DevExtreme.MVC.Demos.Models.SampleData; using System; using System.Linq; using System.Web.Mvc; namespace DevExtreme.MVC.Demos.Controllers { public class DataGridController : Controller { public ActionResult RemoteGrouping() { return View(); } } }
#gridContainer { height: 420px; width: 100%; }