行の色を設定する必要があります。イベントdatagrid
を使用します。loadingrow
DataRowView item = e.Row.Item as DataRowView;
if (item != null)
{
DataRow row = item.Row;
var colValue = row[3];
if (colValue > DATETIME_NOW-10_MINUTES)
{
e.Row.Background = (Brush)new BrushConverter().ConvertFrom("#FCD2CD");
}
}
colValue
タイプdatetime
はSQLテーブルです。最後の 10 分間の色の行を設定するには?