TASLibStandard 2.0.25

dotnet add package TASLibStandard --version 2.0.25
                    
NuGet\Install-Package TASLibStandard -Version 2.0.25
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TASLibStandard" Version="2.0.25" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TASLibStandard" Version="2.0.25" />
                    
Directory.Packages.props
<PackageReference Include="TASLibStandard" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TASLibStandard --version 2.0.25
                    
#r "nuget: TASLibStandard, 2.0.25"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package TASLibStandard@2.0.25
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TASLibStandard&version=2.0.25
                    
Install as a Cake Addin
#tool nuget:?package=TASLibStandard&version=2.0.25
                    
Install as a Cake Tool

TASLibStandard

A .NET library for Web projects by True Arrow Software.

Grid

The Grid<T> component (TASLibStandard.Grid namespace) generates a fully-featured HTML table from a SQL query or an API data source.

Key Features

Feature Description
Dual Data Source Fetch data via SQL (QueryBuilder) or an API delegate / pre-loaded list (GridDataSource.SQL / GridDataSource.API).
Pagination Built-in page navigation with configurable page size and page number.
Column Sorting Clickable column headers with ascending/descending sort indicators (Font Awesome icons).
Row Sorting Optional drag-style row reordering with a callback URL (RowSortURL).
Bulk Selection Checkbox column for selecting multiple rows at once.
Rich Field Types 20+ field types including STRING, INTEGER, CURRENCY, DATE, DATETIME, PHONE, FLAG, PERCENTAGE, LINK, PASSWORD, CALLBACK, and more (see FieldType enum).
Action Icons Per-row action buttons (edit, delete, view, download, etc.) driven by Font Awesome icons (ActionIcon enum). Supports conditional rendering via a callback.
Cell & Row Customization Delegate-based hooks (GridColumns.CellCustomizer, GridRow.RowCustomizer) to inject custom HTML attributes or content.
Row Totals Automatic footer totals for numeric columns (ShowRowTotal).
Record Count Optional total record count display, with the ability to show a specific column's aggregate instead.
Database Abstraction Pluggable IDatabaseInstance — works with SQLServerDB, MySQLServerDB, or any custom implementation.

Quick Start

using TASLibStandard.Grid;

var grid = new Grid<MyModel>
{
    PrimaryKeyFieldName = "Id",
    GridURL = "/items",
    AllowPagination = true,
    IsColumnSortable = true,
    PageSize = 25,
    Columns = new List<GridColumns>
    {
        new GridColumns { Header = "Name",       SortColumn = "Name",      FieldType = FieldType.STRING },
        new GridColumns { Header = "Price",      SortColumn = "Price",     FieldType = FieldType.CURRENCY },
        new GridColumns { Header = "Created",    SortColumn = "CreatedOn", FieldType = FieldType.DATE }
    },
    Icons = new List<GridAction>
    {
        new GridAction("data-action='edit'", ActionIcon.Edit.GetDescriptionfromValue()) { URL = "/items/edit/", RollOverText = "Edit" },
        new GridAction("data-action='delete'", ActionIcon.Delete.GetDescriptionfromValue()) { URL = "/items/delete/", RollOverText = "Delete" }
    }
};

// SQL data source (default)
grid.Query.SelectFrom = "Items";
grid.Query.SelectColumn = "Id, Name, Price, CreatedOn";
string html = grid.GetGrid();
Using an API Data Source
grid.DataSource = GridDataSource.API;
grid.ApiDataFetcher = (page, size, sortCol, sortDir) =>
{
    var result = myService.GetItems(page, size, sortCol, sortDir);
    return new ApiDataResult<MyModel>(result.Items, result.Total);
};

string html = grid.GetGrid();

Core Types

Type Kind Purpose
Grid<T> Class Main grid builder — configures columns, actions, pagination, sorting, and renders HTML.
GridColumns Class Defines a single column: header, sort column, field type, format, CSS class, and cell customizer.
GridAction Struct Defines a per-row action button with icon, URL, tooltip, and optional callback.
GridRow Class Row-level customizer — attach a delegate to inject HTML attributes on each <tr>.
GridStatus Static Class Global active/inactive icon and URL configuration for flag columns.
FieldType Enum Column data types: INTEGER, FLOAT, CURRENCY, STRING, DATE, DATETIME, TIME, PHONE, FLAG, FLAGWITHURL, IMAGE, ICON, CALLBACK, PERCENTAGE, LINK, PASSWORD, MINUTESECOND, and more.
ActionIcon Enum Predefined Font Awesome icons: Edit, View, Delete, Active, Inactive, Upload, Download, Share, URL, etc.
GridDataSource Enum SQL or API — controls where the grid fetches its data.
ApiDataResult<T> Class Wrapper returned by the API delegate containing Data and TotalCount.

License

MIT © True Arrow Software

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.25 89 3/13/2026
2.0.24 101 2/8/2026
2.0.22 106 1/25/2026
2.0.21 106 1/11/2026
2.0.20 112 12/31/2025
1.0.18 331 6/15/2023
1.0.17 578 7/3/2021
1.0.16 444 6/24/2021
1.0.15 630 3/14/2021
1.0.13 543 2/25/2021
1.0.12 512 1/26/2021
1.0.11 527 1/6/2021
1.0.10 559 12/17/2020
1.0.9 784 12/11/2020
1.0.8 554 11/24/2020
1.0.7 644 5/22/2020
1.0.6 933 3/25/2020
1.0.5 816 2/3/2020
Loading failed