Skip to main content

DataTable

Namespace: Wisej.Web.Ext.Webix

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

DataTable is a grid widget that presents data in rows and columns and supports sorting, filtering, editing and selection of rows and cells.

public class DataTable : wxBase

Constructors​

Instance member DataTable()​

Constructs a new instance of the DataTable class.

Example:

The following example creates a table that generates its columns from the fields of the data.

var table = new DataTable();
table.Options.autoConfig = true;
table.Options.select = "row";
table.Options.data = new[]
{
new { id = 1, title = "The Godfather", year = 1972 },
new { id = 2, title = "Pulp Fiction", year = 1994 }
};
table.Dock = DockStyle.Fill;
this.Controls.Add(table);

Instance member DataTable(options)​

Constructs a new instance of the DataTable class.

NameTypeDescription
optionsObjectInitial set of options.

Example:

The following example creates a table with two sortable columns and binds it to an in-memory list of rows.

var table = new DataTable(new
{
select = "row",
columns = new object[]
{
new { id = "title", header = "Title", fillspace = true, sort = "string" },
new { id = "year", header = "Year", width = 80, sort = "int" }
},
data = new[]
{
new { id = 1, title = "The Godfather", year = 1972 },
new { id = 2, title = "Pulp Fiction", year = 1994 }
}
});
table.Dock = DockStyle.Fill;
this.Controls.Add(table);

Implements​