【问题标题】:how to get Sum of Column total in rad grid footer如何在 rad 网格页脚中获取列总和
【发布时间】:2016-03-15 12:08:04
【问题描述】:

如何在 rad 网格页脚中获取列总和。

我试过了

<telerik:GridNumericColumn UniqueName="Amount" DataField="Amount" HeaderText="Amount" FooterAggregateFormatString="{0}" DataType="System.Int32" Aggregate="Sum"> 
</telerik:GridNumericColumn>

【问题讨论】:

  • 您应该添加您当前拥有的代码。我们不写你的程序。

标签: .net telerik radgrid


【解决方案1】:
int total=0;
for (int i=0; i < list.size(); i++){
    total = total + list.get(i).price;
}
Log.e("sum of column", total + " - " );

【讨论】:

  • 请解释为什么这个代码片段会帮助解决这个问题。
【解决方案2】:

根据他们的手册,这应该可以正常工作

<telerik:GridNumericColumn UniqueName="Amount" DataField="Amount" HeaderText="Amount" DataFormatString="{0:C}" DataType="System.Double" Aggregate="Sum"> </telerik:GridNumericColumn>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-01-17
    • 1970-01-01
    • 1970-01-01
    • 2013-11-03
    • 1970-01-01
    • 2014-11-08
    • 1970-01-01
    • 2018-02-13
    相关资源
    最近更新 更多