回复 1楼CP32014的帖子
你是需要提供思路还是已经有Demo但实现上有问题呢?
思路就是:C1DataGrid可以添加SummaryRow。
代码参考:
- <c1:C1DataGrid x:Name="grid" AutoGenerateColumns="False" CanUserAddRows="False" CanUserRemoveRows="False" ItemsSource="{Binding Players}" c1:C1NagScreen.Nag="True">
- <c1:C1DataGrid.Columns>
- <c1:DataGridTextColumn GroupState="Ascending,0" SortState="Ascending,0" SortMemberPath="Name" FilterMemberPath="Name" Width="150" Header="Match" Binding="{Binding Match}">
- </c1:DataGridTextColumn>
- <c1:DataGridTextColumn Width="150" Header="Goals" Binding="{Binding Goals}">
- <c1:DataGridAggregate.AggregateFunctions>
- <c1:DataGridAggregatesCollection>
- <c1:DataGridAggregateSum />
- </c1:DataGridAggregatesCollection>
- </c1:DataGridAggregate.AggregateFunctions>
- </c1:DataGridTextColumn>
- <c1:DataGridTextColumn Width="50" Header="Minutes" Binding="{Binding Minutes}">
- <c1:DataGridAggregate.AggregateFunctions>
- <c1:DataGridAggregatesCollection>
- <c1:DataGridAggregateSum />
- </c1:DataGridAggregatesCollection>
- </c1:DataGridAggregate.AggregateFunctions>
- </c1:DataGridTextColumn>
- </c1:C1DataGrid.Columns>
- <c1:C1DataGrid.BottomRows>
- <c1:DataGridSummaryRow />
- <c1:DataGridSummaryRow />
- </c1:C1DataGrid.BottomRows>
- </c1:C1DataGrid>
复制代码
如果你已经实现了,但目前遇到了问题,请提供实现的Demo和描述具体的问题以及步骤。我们再进一步帮助你看看解决问题的方法。 |