Show / Hide Table of Contents

Class Column

Represents grid column definition

Inheritance
System.Object
DisposableObject
Column
Column<TRow, TValue>
Implements
System.IDisposable
IConfigurable
IConfigurationPersistent
Inherited Members
DisposableObject.DisposeAndNull<T>(T)
DisposableObject.DisposeStarted
DisposableObject.Disposed
DisposableObject.EnsureObjectNotDisposed()
DisposableObject.Dispose()
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()
Namespace: NFX.WinForms.Controls.GridKit
Assembly: NFX.WinForms.dll
Syntax
public abstract class Column : DisposableObject, IDisposable, IConfigurable, IConfigurationPersistent

Constructors

Column(Grid, String, Int32)

Declaration
protected Column(Grid grid, string id, int fieldIndex)
Parameters
Type Name Description
Grid grid
System.String id
System.Int32 fieldIndex

Fields

ArbitraryData

Handy field for attaching some business-related object to a column

Declaration
public object ArbitraryData
Field Value
Type Description
System.Object

CONFIG_SORT_ATTR

Declaration
public const string CONFIG_SORT_ATTR = "sort"
Field Value
Type Description
System.String

CONFIG_VISIBLE_ATTR

Declaration
public const string CONFIG_VISIBLE_ATTR = "visible"
Field Value
Type Description
System.String

CONFIG_WIDTH_ATTR

Declaration
public const string CONFIG_WIDTH_ATTR = "width"
Field Value
Type Description
System.String

MIN_MIN_WIDTH

Declaration
public const int MIN_MIN_WIDTH = 1
Field Value
Type Description
System.Int32

Properties

DataType

Declaration
public abstract Type DataType { get; }
Property Value
Type Description
System.Type

Description

Provides column description

Declaration
public string Description { get; set; }
Property Value
Type Description
System.String

FieldIndex

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

FormatString

Provides column formatting string

Declaration
public string FormatString { get; set; }
Property Value
Type Description
System.String

Grid

Declaration
public Grid Grid { get; }
Property Value
Type Description
Grid

HasCellSelection

Indicartes whether this column has selected cell

Declaration
public bool HasCellSelection { get; }
Property Value
Type Description
System.Boolean

HeaderStyle

Returns style for header cell in this column

Declaration
public Style HeaderStyle { get; }
Property Value
Type Description
Style

ID

Provides unique column ID

Declaration
public string ID { get; }
Property Value
Type Description
System.String

MinWidth

Gets/sets columns minimum width

Declaration
public int MinWidth { get; set; }
Property Value
Type Description
System.Int32

SelectedStyle

Returns style for cell in this column for selected row

Declaration
public Style SelectedStyle { get; }
Property Value
Type Description
Style

SortDirection

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
Type Description
SortDirection

SortingAllowed

Determines whether this column may be sorted by

Declaration
public bool SortingAllowed { get; set; }
Property Value
Type Description
System.Boolean

Style

Returns style for data cells in this column

Declaration
public Style Style { get; }
Property Value
Type Description
Style

Title

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

Visible

Determines whether column is shown in grid

Declaration
public bool Visible { get; set; }
Property Value
Type Description
System.Boolean

Width

Gets/sets columns width

Declaration
public int Width { get; set; }
Property Value
Type Description
System.Int32

Methods

Configure(IConfigSectionNode)

Declaration
public void Configure(IConfigSectionNode node)
Parameters
Type Name Description
IConfigSectionNode node

Destructor()

Declaration
protected override void Destructor()
Overrides
DisposableObject.Destructor()

DispatchCellSelection(CellElement)

Dispatches appropriate events and performs row selection in the grid

Declaration
public virtual void DispatchCellSelection(CellElement cell)
Parameters
Type Name Description
CellElement cell

GetCommentFromRow(Object)

Declaration
public abstract string GetCommentFromRow(object row)
Parameters
Type Name Description
System.Object row
Returns
Type Description
System.String

GetValueFromRow(Object)

Declaration
public abstract object GetValueFromRow(object row)
Parameters
Type Name Description
System.Object row
Returns
Type Description
System.Object

HasValueInRow(Object)

Declaration
public abstract bool HasValueInRow(object row)
Parameters
Type Name Description
System.Object row
Returns
Type Description
System.Boolean

MakeCellElementInstance(Object)

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
Type Description
CellElement

OnCellSelection(CellElement, CellElement)

Invokes event

Declaration
protected virtual void OnCellSelection(CellElement oldCell, CellElement newCell)
Parameters
Type Name Description
CellElement oldCell
CellElement newCell

PersistConfiguration(ConfigSectionNode)

Declaration
public void PersistConfiguration(ConfigSectionNode node)
Parameters
Type Name Description
ConfigSectionNode node

RepositionTo(Column)

Repositions this column in place of other

Declaration
public void RepositionTo(Column other)
Parameters
Type Name Description
Column other

RepresentValueAsString(Object, Object)

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

CellSelection

Occurs when user select a cell that belongs to this column

Declaration
public event CellSelectionEventHandler CellSelection
Event Type
Type Description
CellSelectionEventHandler

Implements

System.IDisposable
IConfigurable
IConfigurationPersistent

Extension Methods

MiscUtils.NonNull<T>(T, Func<Exception>, String)
ObjectValueConversion.AsString(Object, String, ConvertErrorHandling)
ObjectValueConversion.AsNonNullOrEmptyString(Object)
ObjectValueConversion.AsLaconicConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsJSONConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsXMLConfig(Object, ConfigSectionNode, ConvertErrorHandling)
ObjectValueConversion.AsChar(Object, Char, ConvertErrorHandling)
ObjectValueConversion.AsNullableChar(Object, Nullable<Char>, ConvertErrorHandling)
ObjectValueConversion.AsByte(Object, Byte, ConvertErrorHandling)
ObjectValueConversion.AsNullableByte(Object, Nullable<Byte>, ConvertErrorHandling)
ObjectValueConversion.AsSByte(Object, SByte, ConvertErrorHandling)
ObjectValueConversion.AsNullableSByte(Object, Nullable<SByte>, ConvertErrorHandling)
ObjectValueConversion.AsShort(Object, Int16, ConvertErrorHandling)
ObjectValueConversion.AsNullableShort(Object, Nullable<Int16>, ConvertErrorHandling)
ObjectValueConversion.AsUShort(Object, UInt16, ConvertErrorHandling)
ObjectValueConversion.AsNullableUShort(Object, Nullable<UInt16>, ConvertErrorHandling)
ObjectValueConversion.AsInt(Object, Int32, ConvertErrorHandling)
ObjectValueConversion.AsNullableInt(Object, Nullable<Int32>, ConvertErrorHandling)
ObjectValueConversion.AsUInt(Object, UInt32, ConvertErrorHandling)
ObjectValueConversion.AsNullableUInt(Object, Nullable<UInt32>, ConvertErrorHandling)
ObjectValueConversion.AsLong(Object, Int64, ConvertErrorHandling)
ObjectValueConversion.AsNullableLong(Object, Nullable<Int64>, ConvertErrorHandling)
ObjectValueConversion.AsULong(Object, UInt64, ConvertErrorHandling)
ObjectValueConversion.AsNullableULong(Object, Nullable<UInt64>, ConvertErrorHandling)
ObjectValueConversion.AsDouble(Object, Double, ConvertErrorHandling)
ObjectValueConversion.AsNullableDouble(Object, Nullable<Double>, ConvertErrorHandling)
ObjectValueConversion.AsFloat(Object, Single, ConvertErrorHandling)
ObjectValueConversion.AsNullableFloat(Object, Nullable<Single>, ConvertErrorHandling)
ObjectValueConversion.AsDecimal(Object, Decimal, ConvertErrorHandling)
ObjectValueConversion.AsNullableDecimal(Object, Nullable<Decimal>, ConvertErrorHandling)
ObjectValueConversion.AsBool(Object, Boolean, ConvertErrorHandling)
ObjectValueConversion.AsNullableBool(Object, Nullable<Boolean>, ConvertErrorHandling)
ObjectValueConversion.AsGUID(Object, Guid, ConvertErrorHandling)
ObjectValueConversion.AsNullableGUID(Object, Nullable<Guid>, ConvertErrorHandling)
ObjectValueConversion.AsDateTime(Object)
ObjectValueConversion.AsDateTime(Object, DateTime, ConvertErrorHandling)
ObjectValueConversion.AsNullableDateTime(Object, Nullable<DateTime>, ConvertErrorHandling)
ObjectValueConversion.AsGDID(Object)
ObjectValueConversion.AsGDID(Object, GDID, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDID(Object, Nullable<GDID>, ConvertErrorHandling)
ObjectValueConversion.AsGDIDSymbol(Object)
ObjectValueConversion.AsGDIDSymbol(Object, GDIDSymbol, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDIDSymbol(Object, Nullable<GDIDSymbol>, ConvertErrorHandling)
ObjectValueConversion.AsTimeSpan(Object)
ObjectValueConversion.AsTimeSpan(Object, TimeSpan, ConvertErrorHandling)
ObjectValueConversion.AsNullableTimeSpan(Object, Nullable<TimeSpan>, ConvertErrorHandling)
ObjectValueConversion.AsEnum<TEnum>(Object, TEnum, ConvertErrorHandling)
ObjectValueConversion.AsNullableEnum<TEnum>(Object, Nullable<TEnum>, ConvertErrorHandling)
ObjectValueConversion.AsUri(Object, Uri, ConvertErrorHandling)
JSONExtensions.ToJSON(Object, JSONWritingOptions)
JSONExtensions.ToJSON(Object, TextWriter, JSONWritingOptions)
JSONExtensions.ToJSON(Object, Stream, JSONWritingOptions, Encoding)
ErlObject.ToErlObject(Object)
ErlObject.ToErlObject(Object, ErlTypeOrder, Boolean)
Back to top Copyright © 2006-2018 Agnicore Inc
Generated by DocFX