如何将一个cutome行添加到DataGrid的末尾? [英] How to add a cutome row to the end of a DataGrid?

查看:94
本文介绍了如何将一个cutome行添加到DataGrid的末尾?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好。

我有一个问题我有这个DataGrid

Hello.
I have a problem I have this DataGrid

<DataGrid AutoGenerateColumns="False" 

                          x:Name="detailgrid" 

                          Height="100"

                          ItemsSource="{Binding}"

                          Visibility="Collapsed"

                          ToolTip="This Box shows the order details.">
                    <DataGrid.Columns>
                        <DataGridTextColumn Binding="{Binding ISBN}" 

                                            Header="ISBN" 

                                            x:Name="eisbn"

                                            IsReadOnly="True"/>
                        <DataGridTextColumn Binding="{Binding Quantity}" 

                                            Header="Quantity" 

                                            x:Name="equantity"

                                            IsReadOnly="True"/>
                        <DataGridTextColumn Binding="{Binding Price}" 

                                            Header="Price" 

                                            x:Name="eprice"

                                            IsReadOnly="True"/>
                        <DataGridTextColumn Binding="{Binding Total}" 

                                            Header="Total" 

                                            IsReadOnly="True" 

                                            x:Name="etotal"/>
                        <DataGridTextColumn Binding="{Binding Type}" 

                                            Header="Type" 

                                            x:Name="etype"

                                            IsReadOnly="True"/>
                    </DataGrid.Columns>
                </DataGrid>



它有它的item source我想要做的是添加一行(页脚),显示网格内总计的总和。


It has it's item source What I want to do is to add a row(Footer) that shows the sum of the total inside the grid.

推荐答案

http://thibaud60.blogspot.com/2008/10/wpftoolkit-datagrid-with-footer-and.html [ ^ ]



查看以上链接。
http://thibaud60.blogspot.com/2008/10/wpftoolkit-datagrid-with-footer-and.html[^]

Check out the above link.


这篇关于如何将一个cutome行添加到DataGrid的末尾?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆