Class Column
Represents grid column definition
Inheritance
System.Object
Column
Implements
System.IDisposable
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: Azos.WinForms.dll
public abstract class Column : DisposableObject, IDisposable, IConfigurable, IConfigurationPersistent
Constructors
Declaration
protected Column(Grid grid, string id, int fieldIndex)
Parameters
Type |
Name |
Description |
Grid |
grid |
|
System.String |
id |
|
System.Int32 |
fieldIndex |
|
Fields
Handy field for attaching some business-related object to a column
Declaration
public object ArbitraryData
Field Value
Type |
Description |
System.Object |
|
Declaration
public const string CONFIG_SORT_ATTR = "sort"
Field Value
Type |
Description |
System.String |
|
Declaration
public const string CONFIG_VISIBLE_ATTR = "visible"
Field Value
Type |
Description |
System.String |
|
Declaration
public const string CONFIG_WIDTH_ATTR = "width"
Field Value
Type |
Description |
System.String |
|
Declaration
public const int MIN_MIN_WIDTH = 1
Field Value
Type |
Description |
System.Int32 |
|
Properties
Declaration
public abstract Type DataType { get; }
Property Value
Type |
Description |
System.Type |
|
Provides column description
Declaration
public string Description { get; set; }
Property Value
Type |
Description |
System.String |
|
Returns field index - this may be handy for associating column in array position so
column accessors may read data from list/array by index for faster response times
Declaration
public int FieldIndex { get; }
Property Value
Type |
Description |
System.Int32 |
|
Provides column formatting string
Declaration
public string FormatString { get; set; }
Property Value
Type |
Description |
System.String |
|
Declaration
public Grid Grid { get; }
Property Value
Indicartes whether this column has selected cell
Declaration
public bool HasCellSelection { get; }
Property Value
Type |
Description |
System.Boolean |
|
Returns style for header cell in this column
Declaration
public Style HeaderStyle { get; }
Property Value
Provides unique column ID
Declaration
public string ID { get; }
Property Value
Type |
Description |
System.String |
|
Gets/sets columns minimum width
Declaration
public int MinWidth { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
Returns style for cell in this column for selected row
Declaration
public Style SelectedStyle { get; }
Property Value
Returns/Sets sort direction for this column.
Grid and column sorting must be allowed otherwise setting this property has no effect and get
always returns SortDirection.None
Declaration
public SortDirection SortDirection { get; set; }
Property Value
Determines whether this column may be sorted by
Declaration
public bool SortingAllowed { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Returns style for data cells in this column
Declaration
public Style Style { get; }
Property Value
Provides the title of the column. If title not set the column ID is returned
Declaration
public string Title { get; set; }
Property Value
Type |
Description |
System.String |
|
Determines whether column is shown in grid
Declaration
public bool Visible { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Declaration
public int Width { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
Methods
Declaration
public void Configure(IConfigSectionNode node)
Parameters
Declaration
protected override void Destructor()
Overrides
Dispatches appropriate events and performs row selection in the grid
Declaration
public virtual void DispatchCellSelection(CellElement cell)
Parameters
Declaration
public abstract string GetCommentFromRow(object row)
Parameters
Type |
Name |
Description |
System.Object |
row |
|
Returns
Type |
Description |
System.String |
|
Declaration
public abstract object GetValueFromRow(object row)
Parameters
Type |
Name |
Description |
System.Object |
row |
|
Returns
Type |
Description |
System.Object |
|
Declaration
public abstract bool HasValueInRow(object row)
Parameters
Type |
Name |
Description |
System.Object |
row |
|
Returns
Type |
Description |
System.Boolean |
|
Override to create instance of cell view specific to particular column and row
Declaration
public virtual CellElement MakeCellElementInstance(object row)
Parameters
Type |
Name |
Description |
System.Object |
row |
|
Returns
Declaration
protected virtual void OnCellSelection(CellElement oldCell, CellElement newCell)
Parameters
Declaration
public void PersistConfiguration(ConfigSectionNode node)
Parameters
Repositions this column in place of other
Declaration
public void RepositionTo(Column other)
Parameters
Type |
Name |
Description |
Column |
other |
|
Converts/formats cell object value as string so it can be painted. This implementation relies on FormatString.
Row instanced is also passed so formatting may be done per particular row state
Override to perform cell-specific conversions/formatting
Declaration
public virtual string RepresentValueAsString(object row, object value)
Parameters
Type |
Name |
Description |
System.Object |
row |
|
System.Object |
value |
|
Returns
Type |
Description |
System.String |
|
Events
Occurs when user select a cell that belongs to this column
Declaration
public event CellSelectionEventHandler CellSelection
Event Type
Implements
System.IDisposable
Extension Methods