I tried using RowPrePaint event of DataGridView to set rows' BackColor conditionally. When I started my application, rows were rendered correctly but there was a problem that the rows were rendered twice.
I am building an application using Windows Form.
private void grd_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e)
{
var row = grd.Rows[e.RowIndex];
if (row.DataBoundItem is ViewModel model && !model.Materialized)
{
row.DefaultCellStyle.BackColor = Color.Orange;
}
}