TemplatedList.Blazor 1.0.3

Suggested Alternatives

Persilsoft.TemplatedList.Blazor

Additional Details

Now, you can use the Persilsoft.Templatedlist.Blazor package

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package TemplatedList.Blazor --version 1.0.3
NuGet\Install-Package TemplatedList.Blazor -Version 1.0.3
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="TemplatedList.Blazor" Version="1.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add TemplatedList.Blazor --version 1.0.3
#r "nuget: TemplatedList.Blazor, 1.0.3"
#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.
// Install TemplatedList.Blazor as a Cake Addin
#addin nuget:?package=TemplatedList.Blazor&version=1.0.3

// Install TemplatedList.Blazor as a Cake Tool
#tool nuget:?package=TemplatedList.Blazor&version=1.0.3

Templated List for Blazor

A simple implementation of Bootstrap table


Example

You can use it.


<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(2024, 01, 03), 2, 55.50M, "Delivered", true),
            new GetOrdersDto(1, new DateTime(2024, 02, 15), 1, 23.50M, "Delivered", true),
            new GetOrdersDto(1, new DateTime(2024, 03, 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on TemplatedList.Blazor:

Package Downloads
ZMembership.Blazor

Membership Blazor

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated