码迷,mamicode.com
首页 > 其他好文 > 详细

Difference between List View and DataGrid in WPF

时间:2014-08-15 12:11:19      阅读:211      评论:0      收藏:0      [点我收藏+]

标签:des   http   io   strong   for   ar   art   amp   

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.

One thing which DataGrid supports and ListView doesn‘t (out of the box) is automatic column generation.

You can read this article on CodeProject for a better understanding of DataGrid and also about the major differences between ListView and DataGrid.

When thinking of ListView think Windows Explorer, the pane where you see all you‘re files, thats a ListView.

When thinking data base its usually (I said usually) a data grid, mouse over the gridview tag and read the description.

Some very obvious reasons why you would want a gridview is its directly editable. You can have your user enter the questions and the answer in there. Note, since ListViewItem is an Content Control you also could customize it easily like this article does.

Also see if this GridView tutorial helps.

Difference between List View and DataGrid in WPF,布布扣,bubuko.com

Difference between List View and DataGrid in WPF

标签:des   http   io   strong   for   ar   art   amp   

原文地址:http://www.cnblogs.com/bdbw2012/p/3914273.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!