Class CellElement
Represents a cell in a grid
Inheritance
System.Object
CellElement
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: NFX.WinForms.dll
public class CellElement : Element, IDisposable
Constructors
Declaration
protected CellElement(CellView host, object row, Column column)
Parameters
Fields
Declaration
public const int RESIZE_WIDTH = 5
Field Value
Type |
Description |
System.Int32 |
|
Properties
References column that this cell is for
Declaration
public Column Column { get; }
Property Value
Declaration
public Grid Grid { get; }
Property Value
References row that this cell is for, null if header row
Declaration
public object Row { get; }
Property Value
Type |
Description |
System.Object |
|
Returns a style for this cell. Cell style inherit from column style, which in turn inherits from grid style.
Changing cell style does not automatically repaint the element
Declaration
public Style Style { get; }
Property Value
Returns value displayed in this cell or null.
You can call RepresentValueAsString(Value) to get a string representation of this cell
Declaration
public object Value { get; }
Property Value
Type |
Description |
System.Object |
|
Methods
Dispatches action that this cell element was selected
Declaration
protected virtual void DispatchSelection()
Declaration
protected override void OnMouseClick(MouseEventArgs e)
Parameters
Type |
Name |
Description |
System.Windows.Forms.MouseEventArgs |
e |
|
Overrides
Declaration
protected override void OnMouseDown(MouseEventArgs e)
Parameters
Type |
Name |
Description |
System.Windows.Forms.MouseEventArgs |
e |
|
Overrides
Declaration
protected override void OnMouseDrag(MouseEventArgs e)
Parameters
Type |
Name |
Description |
System.Windows.Forms.MouseEventArgs |
e |
|
Overrides
Declaration
protected override void OnMouseDragCancel(EventArgs e)
Parameters
Type |
Name |
Description |
System.EventArgs |
e |
|
Overrides
Declaration
protected override void OnMouseDragRelease(MouseEventArgs e)
Parameters
Type |
Name |
Description |
System.Windows.Forms.MouseEventArgs |
e |
|
Overrides
Declaration
protected override void OnMouseDragStart(MouseEventArgs e)
Parameters
Type |
Name |
Description |
System.Windows.Forms.MouseEventArgs |
e |
|
Overrides
Declaration
protected override void OnMouseEnter(EventArgs e)
Parameters
Type |
Name |
Description |
System.EventArgs |
e |
|
Overrides
Declaration
protected override void OnMouseLeave(EventArgs e)
Parameters
Type |
Name |
Description |
System.EventArgs |
e |
|
Overrides
Declaration
protected override void Paint(Graphics gr)
Parameters
Type |
Name |
Description |
System.Drawing.Graphics |
gr |
|
Overrides
Declaration
protected virtual void PaintBackground(Graphics gr)
Parameters
Type |
Name |
Description |
System.Drawing.Graphics |
gr |
|
Declaration
protected virtual void PaintBorders(Graphics gr)
Parameters
Type |
Name |
Description |
System.Drawing.Graphics |
gr |
|
Declaration
protected virtual void PaintSortingArrows(Graphics gr, SortDirection sort)
Parameters
Type |
Name |
Description |
System.Drawing.Graphics |
gr |
|
SortDirection |
sort |
|
Declaration
protected virtual void PaintValue(Graphics gr, object value)
Parameters
Type |
Name |
Description |
System.Drawing.Graphics |
gr |
|
System.Object |
value |
|
Declaration
protected override void RegionChanged()
Overrides
Converts/formats cell object value as string so it can be painted. This implementation relies on column to convert the value.
Override to perform cell-specific conversions/formatting
Declaration
public virtual string RepresentValueAsString(object value)
Parameters
Type |
Name |
Description |
System.Object |
value |
|
Returns
Type |
Description |
System.String |
|
Implements
System.IDisposable
Extension Methods