Show / Hide Table of Contents

Class Table.TableCells

A collection class that contains all the cells of the Table and methods to modify them.

Inheritance
object
Table.TableCells
Implements
IEnumerable<Table.Cell>
IEnumerable
Inherited Members
object.GetType()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: SadConsole.UI.Controls
Assembly: SadConsole.Extended.dll
Syntax
public sealed class Table.TableCells : IEnumerable<Table.Cell>, IEnumerable

Properties

Count

The amount of cells currently in the table.

Declaration
public int Count { get; }
Property Value
Type Description
int

HeaderRow

True if row 0 should be the header of the table, and remain at the top when vertical scrolling.

Declaration
public bool HeaderRow { get; set; }
Property Value
Type Description
bool

this[int, int]

Gets or creates a new cell on the specified row and column

Declaration
public Table.Cell this[int row, int col] { get; }
Parameters
Type Name Description
int row
int col
Property Value
Type Description
Table.Cell

MaxColumn

The maximum column in the table.

Declaration
public int MaxColumn { get; }
Property Value
Type Description
int

MaxRow

The maximum row in the table.

Declaration
public int MaxRow { get; }
Property Value
Type Description
int

Methods

Clear(bool)

Resets all the cells data

Declaration
public void Clear(bool clearLayoutOptions = true)
Parameters
Type Name Description
bool clearLayoutOptions

ClearContent(bool)

Removes all rows and columns except the header if applicable

Declaration
public void ClearContent(bool clearLayoutOptionsForContent = true)
Parameters
Type Name Description
bool clearLayoutOptionsForContent

Column(int)

Get the layout for the given column

Declaration
public Table.TableCells.Layout Column(int column)
Parameters
Type Name Description
int column
Returns
Type Description
Table.TableCells.Layout

Column(int, bool)

Sets the visibility of the entire column

Declaration
public void Column(int column, bool visible)
Parameters
Type Name Description
int column
bool visible

Deselect()

Deselects the current selected cell.

Declaration
public void Deselect()

GetCell(int, int)

Gets the cell at the given row and col

Declaration
public Table.Cell GetCell(int row, int col)
Parameters
Type Name Description
int row
int col
Returns
Type Description
Table.Cell

GetEnumerator()

Declaration
public IEnumerator<Table.Cell> GetEnumerator()
Returns
Type Description
IEnumerator<Table.Cell>

Remove(int, int)

Removes a cell from the table.

Declaration
public void Remove(int row, int column)
Parameters
Type Name Description
int row
int column

Row(int)

Get the layout for the given row

Declaration
public Table.TableCells.Layout Row(int row)
Parameters
Type Name Description
int row
Returns
Type Description
Table.TableCells.Layout

Row(int, bool)

Sets the visibility of the entire row

Declaration
public void Row(int row, bool visible)
Parameters
Type Name Description
int row
bool visible

Select(int, int)

Sets the specified cell as the selected cell if it exists.

Declaration
public void Select(int row, int column)
Parameters
Type Name Description
int row
int column

Implements

IEnumerable<T>
IEnumerable

Extension Methods

TableExtensions.Column(Table.TableCells, params int[])
TableExtensions.Range(Table.TableCells, int, int, int, int)
TableExtensions.Row(Table.TableCells, params int[])
TableExtensions.ForEach(IEnumerable<Table.Cell>, Action<Table.Cell>)
ExtensionsSystem.GetDebuggerDisplayValue(object)
In this article

Back to top

Back to top Generated by DocFX