ViewTable 1.0.0

A flexible general purpose component for use in MVC views for easily displaying tabulated data.

Install-Package ViewTable -Version 1.0.0
dotnet add package ViewTable --version 1.0.0
<PackageReference Include="ViewTable" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ViewTable --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ViewTable, 1.0.0"
For F# scripts that support #r syntax, copy this into the source code to reference the package.

Release Notes

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 :-)

Dependencies

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.0 851 2/7/2015