I found this Datagrid change row Color based on value in row - #2 by enchev
I'm needing to hightlight the row if they are set to primary when tried the above solution I'm getting an error that datatable is not found
RadzenDataGrid<DisplayMemberAddress> DisplayMemberAddressesGrid;
protected override void OnInitialized()
{
this.DisplayMemberAddressesGrid.dataTable.rowStyleClass = (data, index) => {
return data.Id >= 3 ? 'class1' : 'class2';
}
}
With the solution dated back to 2019, I'm wondering if the backend has changed and if I need to modify this example. Also, I want to confirm whether this needs to be configured before or after data is loaded to the list object.
I've also noticed that if I want to add CSS for the table, I need to add it to the site.css file for it to be read. For some reason, the component.SS file doesn't work, and I have to put it inside the component directly for the CSS to be recognized.