【问题标题】:Adding Footer for GridButtonColumn为 GridButtonColumn 添加页脚
【发布时间】:2012-05-09 23:43:33
【问题描述】:

我正在使用 Radgrid,我想将 GridButtonColumn 单元格的总和放在页脚中,有什么办法吗?

【问题讨论】:

  • 你想对按钮求和?请澄清一下,按钮文本中是否有您想要求和的内容或其他内容
  • 我想对按钮的值求和,按钮中有整数值,我想将总数添加到页脚。

标签: asp.net footer telerik-grid


【解决方案1】:

您应该使用 OnCustomAggregate 网格事件并在那里对您的值求和,这是一篇关于求和的知识库文章:

http://www.telerik.com/help/aspnet-ajax/grid-totals-in-footers.html

和使用示例:

http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/aggregates/defaultcs.aspx

查看后面的代码,方法 RadGrid1_CustomAggregate,这是该示例中布尔列“Discontinued”的自定义总和。

【讨论】:

  • GridButtonColumn 不附带聚合属性
  • 是的,您的请求非常不寻常。您可以添加另一个 GridNumericColumn 并用与按钮相同的数据填充它并求和吗
  • 我不能添加相同值的两列,用户会感到困惑
  • 好吧,如果你对我的按钮求和,我会很困惑 :) 如果你点击其中一个按钮会发生什么?
  • 是的,Telerik 更改了该页面,抱歉我不再使用此页面,但我在这里找到了一个示例:telerik.com/forums/…,希望对您有所帮助
猜你喜欢
  • 2019-02-04
  • 1970-01-01
  • 2022-06-11
  • 2023-03-26
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-03-04
  • 1970-01-01
相关资源
最近更新 更多