我如何使用TotalRow在Janus gridex中显示摘要?

时间:2014-06-02 07:02:03

标签: c# janus

我在janus中有一个带有此代码的超网格

        UltraGridColumn col = new UltraGridColumn();
        ultraGrid1.TotalRow = Janus.Windows.GridEX.InheritableBoolean.True;
        col.Caption = "column1";
        col.DataMember = ISOCntrTable.IsoCode.ColumnName;
        col.Key = "column1";
        col.AggregateFunction = Janus.Windows.GridEX.AggregateFunction.Sum;
        col.FormatString = "c";
        col.TotalFormatMode = Janus.Windows.GridEX.FormatMode.UseStringFormat;
        col.TotalFormatString = "SUM={0:c}";
        ultraGrid1.Columns.Add(col);

但是,TotalRow中没有任何东西显示! 我怎么能在这一行显示摘要? 请帮帮我!

1 个答案:

答案 0 :(得分:1)

您可以在将列添加到网格后添加此代码:

grd.TotalRow = Janus.Windows.GridEX.InheritableBoolean.True;
grd.RootTable.Columns[10].AggregateFunction = Janus.Windows.GridEX.AggregateFunction.Sum;