列表视图和DataGrid中的WPF之间的区别? [英] Difference between List View and DataGrid in WPF?
问题描述
嘿,我得从数据库中检索的一些问题,并在用户屏幕dynamically.I显示它们也需要在网格视图的列中添加一些控制,基本上是一个answer.Please的问题和输入框提示哪一个我应该使用?列表视图或数据网格?
Hey I have to retrieve some questions from the database and display them on the user screen dynamically.I also need to add some controls in the columns of grid view,basically a question and input box for an answer.Please suggest which one should I use? List View or data Grid?
推荐答案
那么,在WPF ListView控件之间的差异
和的DataGrid
只是其中的一个。编辑。你需要编辑使用的DataGrid
,否则使用的ListView
。您可以在 ListView控件编辑
还,但它更容易和构建的DataGrid
。否则,任何可以显示在的DataGrid
,可以显示在的ListView
。
Well, in WPF the difference between ListView
and DataGrid
is just one. Editing. You need editing use DataGrid
, otherwise use ListView
. You can edit in ListView
also but it is easier and build in DataGrid
. Otherwise, whatever can be displayed in DataGrid
, can be displayed in ListView
.
一件事的DataGrid
支持和的ListView
不(开箱即用)是自动列生成。
One thing which DataGrid
supports and ListView
doesn't (out of the box) is automatic column generation.
您可以阅读这篇文章$ C $的CProject 以更好地理解的DataGrid
也关于的ListView
和的DataGrid
之间的主要差异。
You can read this article on CodeProject for a better understanding of DataGrid
and also about the major differences between ListView
and DataGrid
.
这篇关于列表视图和DataGrid中的WPF之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!