mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-28 16:58:01 +01:00
Regenerated Docs (#1870)
This commit is contained in:
@@ -74,7 +74,7 @@
|
||||
|
||||
<p>This control supports viewing and editing tabular data. It provides a view of a <a href="https://docs.microsoft.com/en-us/dotnet/api/system.data.datatable?view=net-5.0">System.DataTable</a>.</p>
|
||||
<p>System.DataTable is a core class of .net standard and can be created very easily</p>
|
||||
<p><a href="../api/Terminal.Gui/Terminal.Gui.TableView.html">TableView API Reference</a></p>
|
||||
<p><a href="../api/Terminal.Gui/Terminal.Gui.TableView.yml">TableView API Reference</a></p>
|
||||
<h2 id="csv-example">Csv Example</h2>
|
||||
<p>You can create a DataTable from a CSV file by creating a new instance and adding columns and rows as you read them. For a robust solution however you might want to look into a CSV parser library that deals with escaping, multi line rows etc.</p>
|
||||
<pre><code class="lang-csharp">var dt = new DataTable();
|
||||
@@ -109,7 +109,16 @@ using(var con = new SqlConnection("Server=myServerAddress;Database=myDataBa
|
||||
};
|
||||
|
||||
tableView.Table = yourDataTable;
|
||||
</code></pre></article>
|
||||
</code></pre><h2 id="table-rendering">Table Rendering</h2>
|
||||
<p>TableView supports any size of table (limited only by the RAM requirements of <code>System.DataTable</code>). You can have
|
||||
thousands of columns and/or millions of rows if you want. Horizontal and vertical scrolling can be done using
|
||||
the mouse or keyboard.</p>
|
||||
<p>TableView uses <code>ColumnOffset</code> and <code>RowOffset</code> to determine the first visible cell of the <code>System.DataTable</code>.
|
||||
Rendering then continues until the avaialble console space is exhausted. Updating the <code>ColumnOffset</code> and
|
||||
<code>RowOffset</code> changes which part of the table is rendered (scrolls the viewport).</p>
|
||||
<p>This approach ensures that no matter how big the table, only a small number of columns/rows need to be
|
||||
evaluated for rendering.</p>
|
||||
</article>
|
||||
</div>
|
||||
|
||||
<div class="hidden-sm col-md-2" role="complementary">
|
||||
|
||||
Reference in New Issue
Block a user