GridCellFormatEventArgs

EventArgsReferences
public abstract class GridCellFormatEventArgs : EventArgs
Event arguments to format a cell in a Grid

Constructors

GridCellFormatEventArgs

#
protected GridCellFormatEventArgs(GridColumn column, object item, int row)
Initializes a new instance of the GridCellFormatEventArgs class.
column (GridColumn)Column to format
item (object)Item for the row being formatted
row (int)Row number being formatted

Properties

BackgroundColor

#
public abstract Color BackgroundColor { get; set; }
Gets or sets the background color for the cell

Column

#
public GridColumn Column { get; }
Gets the column to format

Font

#
public abstract Font Font { get; set; }
Gets or sets the font to use for the cell, or null to use the default font

ForegroundColor

#
public abstract Color ForegroundColor { get; set; }
Gets or sets the foreground color for the cell contents

Item

#
public object Item { get; }
Gets the item that is associated with the row being formatted

Row

#
public int Row { get; }
Gets the row number in the data source

Methods

GetRow

#
protected virtual int GetRow()
Overridable method to get the row number for this event.
Remarks: This is used for situations when getting the row might be computationally expensive on certain platforms, e.g. with the TreeGridView on Gtk.
The row for the item to format