Hello,
after updating to latest version I noticed that class attribute is not added anymore to the column only style attribute. Is this has been removed or there is a better place for it?
All columns have color set if record is not active however class "white-text" is not added.
For example:
public static void ContractorPageGridRender(Radzen.CellRenderEventArgs<Contractor> args)
{
if (args.Data.IsActive == false)
{
if (string.IsNullOrEmpty(args.Column.Property))
{
args.Attributes.Add("class", "white-text text-center");
}
else
{
args.Attributes.Add("class", "white-text");
}
args.Attributes.Add("style", "background-color: #dc3545;");
}
else
{
if (string.IsNullOrEmpty(args.Column.Property))
{
args.Attributes.Add("class", "text-center");
}
}
}
This is how my grid looks like:
<RadzenGrid @ref="Grid" AllowFiltering="true" CellRender="RadzenGridExtensions.ContractorPageGridRender" FilterCaseSensitivity="FilterCaseSensitivity.CaseInsensitive" Responsive="true" AllowPaging="true" PageSize="@PageSize" AllowSorting="true" Data="@Contractors" TItem="Contractor">
<Columns>
<RadzenGridColumn TItem="Contractor" Property="Name" Title="Name">
<FooterTemplate>
<div style="width: 70px;float: left;margin-top: 10px;">Page size:</div> <RadzenDropDown @bind-Value="@PageSizeString" Style="width:60px" Data="@PagesCounts" TValue="string" Change="@PageCountChange" />
</FooterTemplate>
</RadzenGridColumn>
<RadzenGridColumn TItem="Contractor" Property="OfficeNumber" Title="Office number" />
<RadzenGridColumn TItem="Contractor" Property="OutOfHourContactNumber" Title="Out of Hours contact number" />
<RadzenGridColumn TItem="Contractor" Property="Email" Title="Email address" />
<RadzenGridColumn TItem="Contractor" Title="Edit Details" Context="Details" Bubble="false" Filterable="false" Sortable="false" TextAlign="TextAlign.Center" Width="150px">
<Template Context="site">
<RadzenButton Icon="edit" Text="Edit Details" Size="ButtonSize.Small" Click="@((args) => EditContractortDetails(site))" />
</Template>
</RadzenGridColumn>
</Columns>
</RadzenGrid>