Class Table.TableCells
A collection class that contains all the cells of the Table and methods to modify them.
Inherited Members
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
Property Value
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
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
Returns
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
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
Select(int, int)
Sets the specified cell as the selected cell if it exists.
Declaration
public void Select(int row, int column)