DataGrid

The dxDataGrid is a widget that represents data from a local or remote source in the form of a grid. This widget offers such basic features as sorting, grouping, filtering, as well as more advanced capabilities, like state storing, export to Excel, master-detail interface, and many others.

Included in: dx.webappjs.js, dx.all.js
DataGrid interactive configuration
Copy Code
Copy to Codepen
$("#datagrid").dxDataGrid({
});

You can create the widget using one of the following approaches.

  • jQuery
    Use the dxDataGrid jQuery plug-in.

    HTML
    <div id="gridContainer"></div>
    JavaScript
    $("#gridContainer").dxDataGrid({
        dataSource: customers,
        columns: ['CompanyName', 'City', 'State', 'Phone', 'Fax']
    });
  • Knockout
    Add a div element and apply the dxDataGrid binding to this element.

    HTML
    <div data-bind="dxDataGrid: {
        dataSource: customers,
        columns: ['CompanyName', 'City', 'State', 'Phone', 'Fax']
    }"></div>
  • AngularJS
    Add a div element and apply the dx-data-grid directive to this element.

    HTML
    <div dx-data-grid="{
        dataSource: customers,
        columns: ['CompanyName', 'City', 'State', 'Phone', 'Fax']
    }"></div>

Note that DevExtreme widgets require you to link the jQuery and Globalize libraries to your application. If you use the Knockout or AngularJS approach, the Knockout or AngularJS library is also required. For detailed information on linking these libraries to your project, refer to the Installation article.

To provide data for the dxDataGrid widget, specify a data source. dxDataGrid accepts two types of data sources: an array of objects and a DataSource configuration object. To learn more about data binding in dxDataGrid, refer to the Data Binding guide.

Start Tutorial View Demo Watch Video

Configuration

This section describes the configuration options of the dxDataGrid widget.

Methods

This section describes the methods that can be used to manipulate the dxDataGrid widget.

Events

This section describes events fired by this widget.

Row

This section describes the properties of a grid row. An object containing these properties comes to certain event-handling functions.