2012-05-03 16 views

回答

3

你應該有DisplayLayout.Override.AllowRowSummaries財產以這種方式設置:

DisplayLayout.Override.AllowRowSummaries = AllowRowSummaries.Default; 

然後用這樣的代碼來創建彙總 (需要在創建具有相同名稱的另一個概要前檢查)

private void BuildCurrencySummary(string name, UltraGridColumn col) 
{ 
    SummarySettings ss = grd.DisplayLayout.Bands[0].Summaries.Add(name, SummaryType.Sum, col); 
    ss.SummaryPositionColumn = col; 
    ss.SummaryPosition = SummaryPosition.UseSummaryPositionColumn; 
    ss.Appearance.FontData.Bold = Infragistics.Win.DefaultableBoolean.True; 
    ss.Appearance.ForeColor = Color.Black; 
    ss.Appearance.TextHAlign = HAlign.Right; 
    ss.DisplayFormat = "{0:C}"; 
} 
+0

UltraGridColumn還公開AllowRowSummaries屬性,以便您可以啓用或禁用單個列上的sigma圖標。 – alhalama

+0

@alhalama,感謝從未注意到這一點。哦,有時在該網格中的物業數量是壓倒性的 – Steve

+0

完美!僅僅因爲我對你的措辭有點困惑,我自己,我想爲未來的讀者說清楚:它應該是DisplayLayout.Override.AllowRowSummaries = AllowRowSummaries.Default; – BCarpe

0

Infragistics Forum

,您仍然可以申請彙總到列不設置AllowRowSum maries財產。

AllowRowSummaries的目的是顯示(或不顯示)用戶界面以建立自己的摘要。這是你看到的「西格瑪」符號。

從Override對象中,將AllowRowSummaries屬性設置爲False。

UltraGrid1.DisplayLayout.Override.AllowRowSummaries = Infragistics.Win.UltraWinGrid.AllowRowSummaries.[False] 
相關問題