【发布时间】:2015-08-25 20:08:54
【问题描述】:
【问题讨论】:
-
我有两个单元格。如果 cell.a 大于 cell.b 我想更改行颜色。这家伙只想在一个单元格被填满时更改它
标签: row background-color
【问题讨论】:
标签: row background-color
我是这样解决的:
private void dgAnzeigeKostenstelle_LoadingRow(object sender, DataGridRowEventArgs e)
{
try
{
if (Convert.ToInt32(((System.Data.DataRowView)(e.Row.DataContext)).Row.ItemArray[5]) > Convert.ToInt32(((System.Data.DataRowView)(e.Row.DataContext)).Row.ItemArray[4]))
{
e.Row.Background = new SolidColorBrush(Colors.OrangeRed);
}
}
catch
{
}
}
【讨论】: