Skip to main content

Grid

Namespace: Wisej.Web.Ext.Syncfusion2

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

The Grid is used to display and manipulate tabular data with configuration options to control the way the data is presented and manipulated.

public class Grid : ej2Base

Constructors​

Instance member Grid()​

Constructs a new instance of the Grid class.

Example:

The following example creates a grid and binds it to a list of rows through the Options object. The columns are generated from the fields in the data.

var grid = new Grid();
grid.Options.allowSorting = true;
grid.Options.dataSource = new[]
{
new { id = 10248, customer = "VINET", freight = 32.38 },
new { id = 10249, customer = "TOMSP", freight = 11.61 }
};
grid.Dock = DockStyle.Fill;
this.Controls.Add(grid);

Instance member Grid(options)​

Constructs a new instance of the Grid class.

NameTypeDescription
optionsObjectInitial set of options.

Example:

The following example creates a grid with paging and three formatted columns.

var grid = new Grid(new
{
allowPaging = true,
pageSettings = new { pageSize = 25 },
columns = new object[]
{
new { field = "id", headerText = "Order ID", width = 120, textAlign = "Right" },
new { field = "customer", headerText = "Customer", width = 160 },
new { field = "freight", headerText = "Freight", width = 120, format = "C2", textAlign = "Right" }
},
dataSource = new[]
{
new { id = 10248, customer = "VINET", freight = 32.38 },
new { id = 10249, customer = "TOMSP", freight = 11.61 }
}
});
grid.Dock = DockStyle.Fill;
this.Controls.Add(grid);

Implements​