Skip to main content

ejGrid

Namespace: Wisej.Web.Ext.Syncfusion

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

The Grid control for JavaScript is an efficient display engine for tabular data. It will pull data from a datasource such as array of JSON objects, OData web services, or ej.DataManager; binding data fields to columns and displaying a column header to identify the field. It is a feature-rich control that provides extensive appearance customization options with support for grouped records. This Grid is very useful for generating complex grid-based reports with rich formatting. The most important features available in the Grid control for JavaScript are paging, sorting, filtering, searching, grouping, and editing

public class ejGrid : ejBase

Constructors​

Instance member ejGrid()​

Constructs a new instance of the ejGrid class.

Example:

The following example creates the grid and binds it to a list through the options.

var grid = new ejGrid();
grid.Options.dataSource = orders;
grid.Options.allowPaging = true;
grid.Options.allowSorting = true;
grid.Dock = DockStyle.Fill;
this.Controls.Add(grid);

Instance member ejGrid(options)​

Constructs a new instance of the ejGrid class.

NameTypeDescription
optionsObjectInitial set of options.

Example:

The following example creates a paged grid with three columns and shows the order selected by the user.

var grid = new ejGrid(new
{
dataSource = orders,
allowPaging = true,
pageSettings = new { pageSize = 20 },
columns = new object[]
{
new { field = "OrderID", headerText = "Order", isPrimaryKey = true, width = 80 },
new { field = "CustomerID", headerText = "Customer" },
new { field = "Freight", headerText = "Freight", format = "{0:C2}", textAlign = "right" }
}
});
grid.Instance.onRowSelected += new WidgetEventHandler((s, e) =>
{
AlertBox.Show($"Order: {e.Data.data.OrderID}");
});
grid.Dock = DockStyle.Fill;
this.Controls.Add(grid);

Implements​