ViewTable 1.0.0
dotnet add package ViewTable --version 1.0.0
NuGet\Install-Package ViewTable -Version 1.0.0
<PackageReference Include="ViewTable" Version="1.0.0" />
paket add ViewTable --version 1.0.0
#r "nuget: ViewTable, 1.0.0"
// Install ViewTable as a Cake Addin #addin nuget:?package=ViewTable&version=1.0.0 // Install ViewTable as a Cake Tool #tool nuget:?package=ViewTable&version=1.0.0
A flexible general purpose component for use in MVC views for easily displaying tabulated data.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net40 is compatible. net403 was computed. net45 is compatible. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
This package has no dependencies.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 104 | 2/7/2015 |
Sample use
In C#
var table = new Table();
table.AddColumn("FieldId");
table.AddColumn("Value");
table.AddRow("Row1", new object[] { 1, "Some string" });
table.AddRow("Row2", new object[] { 2, 12345 });
table.AddRow(3, new object[] { 2, 12345 });
table.AddRow(4, new object[] { 2, 12345 });
In Razor
<table>
<thead>
<tr>
@foreach(var heading in ViewModel.Table.ColumnMetaData) {
<th>@heading</th>
}
</tr>
</thead>
@foreach(var row in ViewModel.Table.Rows) {
<tr>
<td>@row["FieldId"]</td>
<td>@row["Value"]</td>
</tr>
}
</table>
That's it :-)