日期:2014-05-17  浏览次数:21094 次

wpf里怎么没有winform里的datagridview控件.
wpf听说比winform灵活多了.
可是datagridview绑定任意的列都能自动的显示.(绑定DataTable)
wpf却没有这个控件.
 <ListView ItemsSource="{Binding Dbs}" HorizontalAlignment="Left" Height="250" Margin="706,136,0,0" VerticalAlignment="Top" Width="462">
            <ListView.View>
                <GridView AllowsColumnReorder="true">
                    <GridViewColumn Header="xxx" Width="100">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <TextBox Text="{Binding xxx, Mode=OneWay}"/>
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>

像ListView什么的都要指定列名,这样每个列表都要新建一个窗口才能放得下了.怎么办

------解决方案--------------------
http://cn.bing.com/search?q=wpf+datagrid&qs=n&pq=wpf+datagrid&sc=8-12&sp=-1&sk=&intlF=&upl=zh-chs&FORM=TIPCN1
------解决方案--------------------
wpf的DataGrid和winform的datagridview是一样的功能
------解决方案--------------------
支持楼上,wpf有DataGrid