Persilsoft.TemplatedList.Blazor 1.0.7

dotnet add package Persilsoft.TemplatedList.Blazor --version 1.0.7
                    
NuGet\Install-Package Persilsoft.TemplatedList.Blazor -Version 1.0.7
                    
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="Persilsoft.TemplatedList.Blazor" Version="1.0.7" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Persilsoft.TemplatedList.Blazor" Version="1.0.7" />
                    
Directory.Packages.props
<PackageReference Include="Persilsoft.TemplatedList.Blazor" />
                    
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 Persilsoft.TemplatedList.Blazor --version 1.0.7
                    
#r "nuget: Persilsoft.TemplatedList.Blazor, 1.0.7"
                    
#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.
#addin nuget:?package=Persilsoft.TemplatedList.Blazor&version=1.0.7
                    
Install Persilsoft.TemplatedList.Blazor as a Cake Addin
#tool nuget:?package=Persilsoft.TemplatedList.Blazor&version=1.0.7
                    
Install Persilsoft.TemplatedList.Blazor as a Cake Tool

Templated List for Blazor

A simple implementation of Bootstrap table


Example

You can use it.

@page "/templatedlistdemo"
@using Persilsoft.TemplatedList.Blazor

<PageTitle>TemplatedList Demo</PageTitle>

<h1>TemplatedList Demo</h1>
<hr />

<TemplatedList TItem=GetOrdersDto
                   Loader="LoadOrders"
                   ListGroupClass="table-responsive">
        <Loading>Loading data...</Loading>
        <Empty>
            <h2>No data available</h2>
        </Empty>
        <Item Context=Item>
            <tr>
                <td>
                    <h5 class="text-uppercase text-success">@Item.CreatedTime.ToLongDateString()</h5>
                    Pizzas:
                    <strong>@Item.PizzasCount</strong>
                    <br/>
                    Total:
                    <strong>@Item.GetFormattedTotalPrice()</strong>
                </td>
                <td>
                    Status:
                    <strong>@Item.Status</strong>
                    <div class="d-md-none">
                        @if (!Item.IsDelivered)
                        {
                            <br />
                            <div class="">
                                <a href="orderdetails/@Item.Id" class="btn btn-success">
                                    Track order
                                </a>
                            </div>
                        }
                    </div>
                </td>
                <td>
                    <div class="d-none d-md-block">
                        @if (!Item.IsDelivered)
                        {
                            <div class="col text-end">
                                <a href="#" class="btn btn-success">
                                    Track order
                                </a>
                            </div>
                        }
                    </div>
                </td>
            </tr>
        </Item>
    </TemplatedList>
@code {
    public record class GetOrdersDto(int Id,
                                 DateTime CreatedTime,
                                 int PizzasCount,
                                 decimal TotalPrice,
                                 string Status,
                                 bool IsDelivered)
    {
        public string GetFormattedTotalPrice() =>
            $"$ {TotalPrice.ToString()}";
    }

    private async Task<IReadOnlyCollection<GetOrdersDto>> LoadOrders()
    {
        // The data could come from a Database
        var list = new List<GetOrdersDto>
        {
            new GetOrdersDto(1, new DateTime(2023, 08, 03), 2, 55.50M, "Delivered", true),
            new GetOrdersDto(1, new DateTime(2023, 09, 15), 1, 23.50M, "Delivered", true),
            new GetOrdersDto(1, new DateTime(2023, 10, 16), 2, 57.50M, "Delivered", true),
            new GetOrdersDto(1, DateTime.Now, 2, 66.50M, "On the way", false)
        };

        return await Task.FromResult(list.AsReadOnly());
    }
}

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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. 
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
1.0.7 69 4/12/2025
1.0.6 69 4/12/2025
1.0.5 112 10/16/2024
1.0.4 323 7/19/2024
1.0.3 440 5/21/2024
1.0.2 400 4/18/2024
1.0.1 121 4/18/2024
1.0.0 120 4/18/2024