Skip to main content

dxDataGrid

Namespace: Wisej.Web.Ext.DevExtreme

Assembly: Wisej.Web.Ext.DevExtreme (4.1.0.0)

The DataGrid is a widget that represents data from a local or remote source in the form of a grid.

public class dxDataGrid : dxBase

Constructors​

Instance member dxDataGrid()​

Constructs a new instance of the dxDataGrid class.

Example:

The following example creates a grid and binds it to an in-memory list of rows.

var grid = new dxDataGrid();
grid.Options.dataSource = new[]
{
new { id = 1, name = "Alfreds Futterkiste", city = "Berlin" },
new { id = 2, name = "Around the Horn", city = "London" }
};
grid.Options.keyExpr = "id";
grid.Options.columns = new[] { "name", "city" };
grid.Options.showBorders = true;
grid.Dock = DockStyle.Fill;
this.Controls.Add(grid);

Instance member dxDataGrid(options)​

Constructs a new instance of the dxDataGrid class.

NameTypeDescription
optionsObjectInitial set of options.

Example:

The following example creates a paged grid with a filter row and shows the row clicked by the user.

var grid = new dxDataGrid(new
{
dataSource = orders,
keyExpr = "id",
columns = new object[]
{
"customer",
new { dataField = "total", dataType = "number", format = "currency" }
},
filterRow = new { visible = true },
paging = new { pageSize = 20 }
});
grid.Instance.onRowClick += new WidgetEventHandler((s, e) =>
{
AlertBox.Show($"Order {e.Data.key}");
});
grid.Dock = DockStyle.Fill;
this.Controls.Add(grid);

Implements​