New to Telerik UI for WinForms? Start a free 30-day trial

CellIndex

Struct

Identifies a data or header cell by row and column coordinates; -1 marks a header axis, and (-1, -1) identifies the description corner.

Definition

Namespace:Telerik.WinControls.UI.HeatMap

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public struct CellIndex : IEquatable<CellIndex>

Implements: IEquatable<CellIndex>

Constructors

Creates a cell index from row and column coordinates.

C#
public CellIndex(int rowIndex, int columnIndex)
Parameters:rowIndexint

The zero-based row coordinate, or -1 for a column header.

columnIndexint

The zero-based column coordinate, or -1 for a row header.

When both coordinates are -1, the index identifies the description corner cell.

Properties

Gets the column coordinate; -1 identifies a row header.

C#
public readonly int ColumnIndex { get; }

Gets the empty-cell sentinel whose row and column coordinates are both MinValue.

C#
public static CellIndex Empty { get; }

Gets whether both coordinates identify a data cell rather than a header.

C#
public bool IsDataCell { get; }

Gets whether this index equals the Empty sentinel.

C#
public bool IsEmpty { get; }

Gets whether either coordinate identifies a header.

C#
public bool IsHeaderCell { get; }

Gets the row coordinate; -1 identifies a column header.

C#
public readonly int RowIndex { get; }

Methods

Compares this index with another by row and column coordinates.

C#
public bool Equals(CellIndex other)
Parameters:otherCellIndex

The cell index to compare.

Returns:

bool

true when both coordinates match.

Implements: IEquatable<CellIndex>.Equals(CellIndex)

Compares the row and column coordinates with a boxed CellIndex.

C#
public override bool Equals(object obj)
Parameters:objobject

The boxed cell index to compare.

Returns:

bool

true when both coordinates match.

Exceptions: InvalidCastException

obj is not a boxed CellIndex.

NullReferenceException

obj is null.

Overrides: ValueType.Equals(object)

Returns the hash code for this cell index.

C#
public override int GetHashCode()
Returns:

int

A hash code for use in hash-based collections.

Overrides: ValueType.GetHashCode()

Returns the coordinates in the form RowIndex{row}:ColumnIndex{column}.

C#
public override string ToString()
Returns:

string

A string representing this index's row and column coordinates.

Overrides: ValueType.ToString()

Operators

Determines whether two cell indices have different row or column coordinates.

C#
public static bool operator !=(CellIndex ci1, CellIndex ci2)
Parameters:ci1CellIndex

The first index.

ci2CellIndex

The second index.

Returns:

bool

true when either coordinate differs.

Determines whether two cell indices have matching row and column coordinates.

C#
public static bool operator ==(CellIndex ci1, CellIndex ci2)
Parameters:ci1CellIndex

The first index.

ci2CellIndex

The second index.

Returns:

bool

true when both coordinates match.