Skip to content

Commit

Permalink
DataGrid column FormatString can be used to localize boolean in Check…
Browse files Browse the repository at this point in the history
…BoxList filter
  • Loading branch information
enchev committed Oct 4, 2024
1 parent b83cca1 commit dc03621
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Radzen.Blazor/RadzenDataGridHeaderCell.razor
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
}
else
{
@(!string.IsNullOrEmpty(Column.FormatString) ? string.Format(Column.FormatProvider ?? Grid?.Culture ?? CultureInfo.CurrentCulture, Column.FormatString, context ?? "") : Convert.ToString(context ?? "", Grid?.Culture ?? CultureInfo.CurrentCulture))
@(!string.IsNullOrEmpty(Column.FormatString) ? string.Format(Column.FormatProvider ?? Grid?.Culture ?? CultureInfo.CurrentCulture, Column.FormatString, context is bool ? context.GetHashCode() : context ?? "") : Convert.ToString(context ?? "", Grid?.Culture ?? CultureInfo.CurrentCulture))
}
</Template>
</RadzenListBox>
Expand Down
2 changes: 1 addition & 1 deletion RadzenBlazorDemos/Pages/DataGridCheckBoxListFilter.razor
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<Columns>
<RadzenDataGridColumn Property="OrderID" Title="Order ID" />
<RadzenDataGridColumn Property="Customer.CompanyName" Title="Customer" AllowCheckBoxListVirtualization="false" />
<RadzenDataGridColumn Property="ProductDiscontinued" Title="Discontinued" />
<RadzenDataGridColumn Property="ProductDiscontinued" Title="Discontinued" FormatString="{0:Yes;0;No}" />
<RadzenDataGridColumn Property="Employee.LastName" Title="Employee">
<Template Context="order">
<RadzenImage Path="@order.Employee?.Photo" Style="width: 32px; height: 32px;" class="rz-border-radius-4 rz-me-2" AlternateText="@(order.Employee?.FirstName + " " + order.Employee?.LastName)" />
Expand Down

0 comments on commit dc03621

Please sign in to comment.