EdenForge.Blazor
1.0.2
dotnet add package EdenForge.Blazor --version 1.0.2
NuGet\Install-Package EdenForge.Blazor -Version 1.0.2
<PackageReference Include="EdenForge.Blazor" Version="1.0.2" />
<PackageVersion Include="EdenForge.Blazor" Version="1.0.2" />
<PackageReference Include="EdenForge.Blazor" />
paket add EdenForge.Blazor --version 1.0.2
#r "nuget: EdenForge.Blazor, 1.0.2"
#addin nuget:?package=EdenForge.Blazor&version=1.0.2
#tool nuget:?package=EdenForge.Blazor&version=1.0.2
CSVDownload Component
Usage Guide:
To utilize the CSVDownload component, follow the syntax:
<CSVDownload Class="@Class" Data="@Data" Description="@Description" FileName="@FileName" />
@Class: Defines the Bootstrap CSS class, e.g., "btn btn-primary".
@Data: Input data to be exported.
@Description: Description for the button.
@FileName: Name of the output file.
Usage Examples:
In Demo.razor
@page "/demo"
@using EdenForge.Blazor.Components
<CSVDownload Class="btn btn-primary" Data="@Car" Description="@Description" FileName="@Filename" />
@code {
// Cars class definition
public class Cars
{
public string Id { get; set; }
public string CarMake { get; set; }
public string Model { get; set; }
public int Year { get; set; }
public int Price { get; set; }
}
public string Filename = "Cars.csv";
public string Class = "btn btn-primary";
public string Description = "CSV Download";
public List<Cars>? Car { get; set; }
protected override async Task OnInitializedAsync()
{
Car = new List<Cars>
{
new Cars { Id = "CAR_001", CarMake = "Toyota", Model = "Corolla", Year = 2018, Price = 18000 },
new Cars { Id = "CAR_002", CarMake = "Honda", Model = "Civic", Year = 2019, Price = 20000 },
new Cars { Id = "CAR_003", CarMake = "Ford", Model = "Fusion", Year = 2020, Price = 22000 },
new Cars { Id = "CAR_004", CarMake = "Chevrolet", Model = "Malibu", Year = 2017, Price = 19000 },
new Cars { Id = "CAR_005", CarMake = "BMW", Model = "3 Series", Year = 2021, Price = 35000 }
};
}
}
Results:
Cars.csv
"Id","CarMake","Model","Year","Price"
"CAR_001","Toyota","Corolla","2018","18000"
"CAR_002","Honda","Civic","2019","20000"
"CAR_003","Ford","Fusion","2020","22000"
"CAR_004","Chevrolet","Malibu","2017","19000"
"CAR_005","BMW","3 Series","2021","35000"
This example demonstrates how to use the CSVDownload component to export car data to a CSV file. Customize the class, description, and file name according to your requirements.
Feel free to integrate this NuGet package into your Blazor application to simplify data export tasks.
Product | Versions 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. |
-
net8.0
- Microsoft.AspNetCore.Components.Web (>= 8.0.2)
- Microsoft.JSInterop (>= 8.0.3)
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.2 | 885 | 3/12/2024 |