'宣言 Public Property Appearance As Infragistics.Win.Appearance
public Infragistics.Win.Appearance Appearance {get; set;}
このプロパティは、この集計値インスタンスの外観を制御します。グリッドまたはバンドのすべての集計の外観を設定するには、Override の UltraGridOverride.SummaryValueAppearance プロパティを使用します。
注: 集計フッターおよび集計値に必要な高さを計算する際は、Override オブジェクトの UltraGridOverride.SummaryValueAppearance のフォント設定が使用されます。そのため、個々の SummarySettings オブジェクトまたは SummaryValue オブジェクトのフォント サイズを変更する場合は、バンドまたはレイアウトの Override オブジェクトの SummaryValueAppearance に同じサイズのフォントを割り当ててください。
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinGrid Private Sub UltraGrid1_SummaryValueChanged(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.SummaryValueChangedEventArgs) Handles ultraGrid1.SummaryValueChanged ' Use the key to identify what summary the SummaryValue object is associated with ' and set appearance properties accordingly. If e.SummaryValue.Key = "Max" Then If CType(e.SummaryValue.Value, Decimal) < 20 Then ' If the max is less than han 40, then highlight the summary with red color ' by setting the back color to red e.SummaryValue.Appearance.BackColor = Color.LightYellow Else e.SummaryValue.Appearance.BackColor = Color.SkyBlue End If End If If e.SummaryValue.Key = "Avg" Then If CType(e.SummaryValue.Value, Decimal) > 20 Then ' If the sum is greater than 20, then highlight the summary with red color ' by setting the back color to red e.SummaryValue.Appearance.BackColor = Color.LightSkyBlue Else e.SummaryValue.Appearance.BackColor = Color.LightYellow End If End If End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinGrid; using System.Diagnostics; private void ultraGrid1_SummaryValueChanged(object sender, Infragistics.Win.UltraWinGrid.SummaryValueChangedEventArgs e) { // Use the key to identify what summary the SummaryValue object is associated with // and set appearance properties accordingly. if ( e.SummaryValue.Key == "Max" ) { if ( (decimal)e.SummaryValue.Value < 20 ) { // If the max is less than han 40, then highlight the summary with red color // by setting the back color to red e.SummaryValue.Appearance.BackColor = Color.LightYellow; } else { e.SummaryValue.Appearance.BackColor = Color.SkyBlue; } } if ( e.SummaryValue.Key == "Avg" ) { if ( (decimal)e.SummaryValue.Value > 20 ) { // If the sum is greater than 20, then highlight the summary with red color // by setting the back color to red e.SummaryValue.Appearance.BackColor = Color.LightSkyBlue; } else { e.SummaryValue.Appearance.BackColor = Color.LightYellow; } } }