Fix 1130 broken links (#1131)

* fixed table & treeview docs

* regen docs

* relnote
This commit is contained in:
Charlie Kindel
2021-03-09 12:36:37 -07:00
committed by GitHub
parent 1cf2ce1985
commit 4da9ad0e89
51 changed files with 586 additions and 1511 deletions

View File

@@ -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(&#39;,&#39;)){
dt.Columns.Add(h);
dt.Columns.Add(h);
}
foreach(var line in lines.Skip(1)) {
dt.Rows.Add(line.Split(&#39;,&#39;));
}