mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-29 09:18:01 +01:00
Fix 1130 broken links (#1131)
* fixed table & treeview docs * regen docs * relnote
This commit is contained in:
@@ -72,18 +72,18 @@
|
||||
<article class="content wrap" id="_content" data-uid="">
|
||||
<h1 id="table-view">Table View</h1>
|
||||
|
||||
<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>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>
|
||||
<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>
|
||||
<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();
|
||||
var lines = File.ReadAllLines(filename);
|
||||
|
||||
foreach(var h in lines[0].Split(',')){
|
||||
dt.Columns.Add(h);
|
||||
dt.Columns.Add(h);
|
||||
}
|
||||
|
||||
|
||||
foreach(var line in lines.Skip(1)) {
|
||||
dt.Rows.Add(line.Split(','));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user