Table of Contents

Class DataColumn

Namespace
PluginUI
Assembly
PluginUI.dll

Column of a DataTable.

public sealed class DataColumn
Inheritance
DataColumn
Inherited Members

Constructors

DataColumn(string, Func<object, string>, float)

Creates a column.

public DataColumn(string header, Func<object, string> cellText, float width = NaN)

Parameters

header string

Header caption.

cellText Func<object, string>

Text of the cell for a row item.

width float

Width in DIPs (NaN = proportional share of the remaining space, see Star).

Properties

Alignment

Cell (and header) alignment.

public HorizontalAlignment Alignment { get; set; }

Property Value

HorizontalAlignment

CellColor

Optional per-cell text color.

[Browsable(false)]
public Func<object, Color?>? CellColor { get; set; }

Property Value

Func<object, Color?>

CellText

Cell text for a row item.

[Browsable(false)]
public Func<object, string> CellText { get; set; }

Property Value

Func<object, string>

CommitEdit

Called with the new text after an in-place edit (null = read-only column).

[Browsable(false)]
public Action<object, string>? CommitEdit { get; set; }

Property Value

Action<object, string>

Comparison

Sort comparison (null = not sortable).

[Browsable(false)]
public Comparison<object>? Comparison { get; set; }

Property Value

Comparison<object>

Header

Header caption.

public string Header { get; set; }

Property Value

string

IsEditable

true if cells can be edited in place.

public bool IsEditable { get; }

Property Value

bool

IsResizable

Lets the user resize the column.

public bool IsResizable { get; set; }

Property Value

bool

MinWidth

Minimum width.

public float MinWidth { get; set; }

Property Value

float

Star

Weight of a proportional column.

public float Star { get; set; }

Property Value

float

Width

Width in DIPs; NaN for a proportional column. Set by the user when resizing.

public float Width { get; set; }

Property Value

float

Methods

SortByText()

Makes the column sortable by its text (ordinal, case-insensitive) — fluent.

public DataColumn SortByText()

Returns

DataColumn