Webix
Webix is a JavaScript UI library from XB Software. It has a fast datatable, charts and a large set of standard views, plus Webix PRO "complex widgets" that are small applications in their own right: Pivot, Kanban, Gantt, Scheduler, Spreadsheet, File Manager, Document Manager, Report Manager, Query, Diagram, Chat and User Manager. The Wisej.Web.Ext.Webix extension wraps 36 of them as Wisej.NET controls.

Installation
dotnet add package Wisej-4-Webix
The package targets .NET Framework 4.8 and .NET 8 or later. After a rebuild, the widgets appear in the Visual Studio toolbox.
Most widgets in this extension are Webix PRO components, which are commercial products of XB Software. You need a Webix PRO licence, which is separate from your Wisej.NET licence. Your Wisej.NET licence must also include the premium extensions. The Webix wrapper has no licenseKey setting: follow XB Software's instructions for deploying your licensed build, typically as a local or embedded source (see Deployment).
By default the scripts come from the Webix CDN, using the edge builds, which always point to the latest release: webix.js, plus the script and stylesheet of every PRO module. See Configuration to pin a version or to serve the files yourself.
The default Wisej.Web.Ext.Webix.json of the 4.1 extension has two problems. Override it with your own file:
- Its CDN root is
http://cdn.webix.com. Browsers blockhttp:scripts on anhttps:page (mixed content), so the widgets never load on a secure site. Change the root tohttps://cdn.webix.com. - Its default theme is
webix, which makes the extension requestedge/skins/webix.css. That file doesn't exist on the CDN: the default skin is built intowebix.css. Set"theme"to a skin that does exist, such asmaterial,mini,flat,compact,contrast,willowordark, or set the staticwxBase.Theme.
{
"source": "cdn",
"theme": "material",
"sources": {
"cdn": {
"root": "https://cdn.webix.com",
"packages": {
"webix.js": "%root%/edge/webix.js",
"theme.css": "%root%/edge/skins/%theme%.css",
"kanban.js": "%root%/pro/edge/kanban/kanban.js",
"kanban.css": "%root%/pro/edge/kanban/kanban.css"
}
}
}
}
Every Webix widget loads every package in the configuration file, so with the default file even a simple Calendar downloads all twelve PRO modules. In your own file, keep webix.js, the theme, and the modules your application actually uses, as in the example above.
How the wrapper works
Every widget derives from wxBase, which derives from the Wisej.NET Widget. Each class names the Webix view it creates. The wrapper adds view and container to your options and calls webix.ui(options), so Options holds exactly the configuration object that Webix's documentation shows for that view.
| Wisej.NET class | Webix view |
|---|---|
DataTable | datatable |
Pivot | pivot |
Kanban | kanban |
Scheduler | scheduler |
RangeChart | rangechart |
- Webix properties go into
Options. - Webix methods are called through
Instance. - Webix events are attached with
attachEvent. The wrapper adds theonprefix for you, soInstance.onItemClickin C#, orAddListener("itemClick", …), listens to Webix'sonItemClick. See Events.
Wisej.Web.Ext.Webix.DataTable has the same name as System.Data.DataTable. In files that use both, qualify the name or add an alias, for example using wx = Wisej.Web.Ext.Webix;.
Getting started
- C#
- VB.NET
using wx = Wisej.Web.Ext.Webix;
var table = new wx.DataTable { Dock = DockStyle.Fill };
table.Options = new
{
autoConfig = false,
select = "row",
columns = new object[] {
new { id = "title", header = "Film", fillspace = true, sort = "string" },
new { id = "year", header = "Released", width = 100, sort = "int" },
new { id = "votes", header = "Votes", width = 100, sort = "int" }
},
data = new[] {
new { id = 1, title = "The Shawshank Redemption", year = 1994, votes = 678790 },
new { id = 2, title = "The Godfather", year = 1972, votes = 511495 },
new { id = 3, title = "The Dark Knight", year = 2008, votes = 670016 }
}
};
// https://docs.webix.com/api__link__ui.datatable_onitemclick_event.html
table.Instance.onItemClick += new WidgetEventHandler((s, e) =>
{
AlertBox.Show("Clicked row " + e.Data.row);
});
this.Controls.Add(table);
// Later: ask the browser which row is selected.
var selectedId = await table.Instance.getSelectedIdAsync();
Option Strict Off
Imports wx = Wisej.Web.Ext.Webix
Dim table As New wx.DataTable With {.Dock = DockStyle.Fill}
table.Options = New With {
.autoConfig = False,
.select = "row",
.columns = New Object() {
New With {.id = "title", .header = "Film", .fillspace = True, .sort = "string"},
New With {.id = "year", .header = "Released", .width = 100, .sort = "int"},
New With {.id = "votes", .header = "Votes", .width = 100, .sort = "int"}
},
.data = {
New With {.id = 1, .title = "The Shawshank Redemption", .year = 1994, .votes = 678790},
New With {.id = 2, .title = "The Godfather", .year = 1972, .votes = 511495},
New With {.id = 3, .title = "The Dark Knight", .year = 2008, .votes = 670016}
}
}
table.AddListener("itemClick", AddressOf Table_ItemClick)
Me.Controls.Add(table)
Private Sub Table_ItemClick(sender As Object, e As WidgetEventArgs)
AlertBox.Show("Clicked row " & e.Data.row)
End Sub
Widgets
| Area | Classes |
|---|---|
| Data | DataTable, TreeTable, Tree, GroupList, UnitList, Filter, Query, Pivot |
| Charts | Chart, RangeChart, GeoChart, TreeMap, Gage, Barcode |
| Planning | Scheduler, Gantt, Kanban, Calendar, DateRange, TimeBoard, TimeLine |
| Documents and files | Spreadsheet, ExcelViewer, PDFViewer, FileManager, DocumentManager, ReportManager, Diagram |
| Layout and navigation | Dashboard, Sidebar, SideMenu |
| Other | Chat, UserManager, ColorBoard, ColorPicker, ColorSelect |
File Manager, Document Manager, Report Manager, Chat, User Manager and some Gantt and Scheduler configurations expect a back-end service that follows XB Software's protocol, usually a REST API given in the options (url, api, …). The extension doesn't provide those services: implement them in your application, for example with ASP.NET Core minimal APIs, following the Webix documentation for each widget.
Themes and localization
wxBase.Theme selects the Webix skin: the value becomes edge/skins/<theme>.css with the default configuration. Available skins include material, mini, flat, compact, contrast, willow and dark. wxBase.Culture sets the culture passed to the widgets. The default configuration loads no locale files: add Webix's locale scripts as packages if you need them. See Configuration.
wxBase.Theme = "willow";
Resources
- Webix documentation
- API reference: UI views
- Demos
- Premium extensions overview: options, methods, events, functions and templates
- Configuration: versions, sources, themes