Interface ITableDataSource
- Namespace
- SharpConsoleUI.Controls
- Assembly
- SharpConsoleUI.dll
Interface for virtual/lazy data binding to a TableControl. Enables large datasets (millions of rows) without memory overhead by querying only visible rows on demand.
public interface ITableDataSource : INotifyCollectionChanged
- Inherited Members
- Extension Methods
Properties
CanFilter
Gets whether the data source supports server-side filtering.
bool CanFilter { get; }
Property Value
ColumnCount
Gets the total number of columns in the data source.
int ColumnCount { get; }
Property Value
RowCount
Gets the total number of rows in the data source.
int RowCount { get; }
Property Value
Methods
ApplyFilter(string, string?, FilterOperator)
Applies a filter to the data source.
void ApplyFilter(string filterText, string? columnName, FilterOperator op)
Parameters
filterTextstringcolumnNamestringopFilterOperator
CanSort(int)
Gets whether the data source supports sorting on the specified column.
bool CanSort(int columnIndex)
Parameters
columnIndexint
Returns
ClearFilter()
Clears any active filter on the data source.
void ClearFilter()
GetCellValue(int, int)
Gets the cell value at the specified row and column.
string GetCellValue(int rowIndex, int columnIndex)
Parameters
Returns
GetColumnAlignment(int)
Gets the text alignment for a column.
TextJustification GetColumnAlignment(int columnIndex)
Parameters
columnIndexint
Returns
GetColumnHeader(int)
Gets the header text for a column.
string GetColumnHeader(int columnIndex)
Parameters
columnIndexint
Returns
GetColumnWidth(int)
Gets the fixed width for a column. Null means auto-width.
int? GetColumnWidth(int columnIndex)
Parameters
columnIndexint
Returns
- int?
GetRowBackgroundColor(int)
Gets the background color for a row. Null means use table default.
Color? GetRowBackgroundColor(int rowIndex)
Parameters
rowIndexint
Returns
GetRowForegroundColor(int)
Gets the foreground color for a row. Null means use table default.
Color? GetRowForegroundColor(int rowIndex)
Parameters
rowIndexint
Returns
GetRowTag(int)
Gets an arbitrary tag object for a row.
object? GetRowTag(int rowIndex)
Parameters
rowIndexint
Returns
IsRowEnabled(int)
Gets whether a row is enabled for interaction.
bool IsRowEnabled(int rowIndex)
Parameters
rowIndexint
Returns
Sort(int, SortDirection)
Sorts the data source by the specified column and direction.
void Sort(int columnIndex, SortDirection direction)
Parameters
columnIndexintdirectionSortDirection