-
Notifications
You must be signed in to change notification settings - Fork 18
Home
Radu Martin edited this page Apr 15, 2017
·
18 revisions
These extenders simplify the work with data-bound in WinForms.
var tbl1 = CreateAndLoadDataTable();
...
gridView.GenerateColumns(BindingSource,
new ColumnDataDescriptor("Header#1", tbl1.Column1),
new ColumnDataDescriptor("Header#2", tbl1.Column2),
new ColumnDataDescriptor("Header#3", tbl1.Column3, FillWeight: 100));
gridView.PrepareStyleForEditingData();
gridView.AddDataRowStateDrawingInRowHeaders();
layoutPanel.GenerateGroups(BindingSource,
new GroupDataDescriptor("GroupName#1",
new FieldDataDescriptor("Header#1", tbl1.Column1),
new FieldDataDescriptor("Header#2", tbl1.Column2)),
new GroupDataDescriptor("GroupName#2",
new FieldDataDescriptor("Header#3", tbl1.Column3)));
DataViewExtenders use special things that were introduced in .NET Framework 4.0:
- Extension Methods (introduced in .NET Framework 3.5)
- String.IsNullOrWhiteSpace method
- Tuple Class
Extenders:
DataGridView
DataGridViewColumn
FlowLayoutPanel
TableLayoutPanel
Features:
SelectItemForm
Settings
Components:
BitMaskCheckedListBox
HeaderTableLayoutPanel
SelectItemForm