找回密码
 立即注册

QQ登录

只需一步,快速开始

CP32014

中级会员

8

主题

16

帖子

880

积分

中级会员

积分
880

活字格认证

CP32014
中级会员   /  发表于:2014-11-4 05:59  /   查看:5025  /  回复:3
如图 上这样的效果  谢谢版主了 :Z

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x

3 个回复

倒序浏览
Alice
社区贡献组   /  发表于:2014-11-4 09:26:00
沙发
回复 1楼CP32014的帖子

你是需要提供思路还是已经有Demo但实现上有问题呢?
思路就是:C1DataGrid可以添加SummaryRow。
代码参考:
  1. <c1:C1DataGrid x:Name="grid" AutoGenerateColumns="False" CanUserAddRows="False" CanUserRemoveRows="False" ItemsSource="{Binding Players}" c1:C1NagScreen.Nag="True">
  2.     <c1:C1DataGrid.Columns>
  3.         <c1:DataGridTextColumn   GroupState="Ascending,0" SortState="Ascending,0" SortMemberPath="Name" FilterMemberPath="Name" Width="150" Header="Match" Binding="{Binding Match}">                    
  4.         </c1:DataGridTextColumn>
  5.         <c1:DataGridTextColumn Width="150" Header="Goals" Binding="{Binding Goals}">
  6.             <c1:DataGridAggregate.AggregateFunctions>
  7.                 <c1:DataGridAggregatesCollection>
  8.                     <c1:DataGridAggregateSum />
  9.                 </c1:DataGridAggregatesCollection>
  10.             </c1:DataGridAggregate.AggregateFunctions>
  11.         </c1:DataGridTextColumn>
  12.         <c1:DataGridTextColumn Width="50" Header="Minutes" Binding="{Binding Minutes}">
  13.             <c1:DataGridAggregate.AggregateFunctions>
  14.                 <c1:DataGridAggregatesCollection>
  15.                     <c1:DataGridAggregateSum />
  16.                 </c1:DataGridAggregatesCollection>
  17.             </c1:DataGridAggregate.AggregateFunctions>
  18.         </c1:DataGridTextColumn>
  19.     </c1:C1DataGrid.Columns>
  20.     <c1:C1DataGrid.BottomRows>
  21.         <c1:DataGridSummaryRow />
  22.         <c1:DataGridSummaryRow />
  23.     </c1:C1DataGrid.BottomRows>
  24. </c1:C1DataGrid>
复制代码


如果你已经实现了,但目前遇到了问题,请提供实现的Demo和描述具体的问题以及步骤。我们再进一步帮助你看看解决问题的方法。
请点击评分,对我的服务做出评价!  5分为非常满意!

葡萄城控件服务团队

官方网站: http://www.gcpowertools.com.cn
回复 使用道具 举报
cingsoft
高级会员   /  发表于:2015-7-8 14:04:00
板凳
你这个是页面代码实现的吧 有办法用代码实现这个不 有的话 请提供一下代码
回复 使用道具 举报
Alice
社区贡献组   /  发表于:2015-7-8 15:44:00
地板
回复 3楼cingsoft的帖子

请问你指的是使用VB或C#代码实现么?
你可以使用C1DataGrid的BottomRows.Add方法添加合并行。
请点击评分,对我的服务做出评价!  5分为非常满意!

葡萄城控件服务团队

官方网站: http://www.gcpowertools.com.cn
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部