ProgressBar in DataGrid


Is it possible to have a column show a ProgressBar from the column value (int 0->100)?
If yes, how can it be done?


Here is an example:

@if (orderDetails == null)
    <RadzenGrid AllowPaging="true" PageSize="4" AllowSorting="true" Data="@orderDetails" TItem="OrderDetail" ColumnWidth="200px">
            <RadzenGridColumn TItem="OrderDetail" Property="OrderID" Title="Order ID" />
            <RadzenGridColumn TItem="OrderDetail" Property="OrderID" Title="Product ID" />
            <RadzenGridColumn TItem="OrderDetail" Property="Discount" Title="Discount" Sortable="false" Filterable="false">
                <Template Context="data">
                    <RadzenProgressBar Value="@(data?.Discount * 100)" />

@code {
    IEnumerable<OrderDetail> orderDetails;

    protected override async Task OnInitializedAsync()
        orderDetails = await Task.FromResult(dbContext.OrderDetails);

1 Like

BTW - Is this something that can also be done via the Radzen desktop app or only via Visual Studio?

It can be done both using Radzen or Visual Studio. You have template designer for every template including DataGrid columns Template:

Got it, thanks a lot!