与使用 ListView 相比,使用数据网格控件的主要优势是什么?什么时候应该使用每一个?
最佳答案
需要考虑的几点 Colin Eber已在 DataGrid vs GridView 中声明讨论:
- ListView (GridView) is a readonly control out-of-the-box.The standard solution would be to synchronise the list with a 'details view' comprised of textBoxes
- The DataGrid allows in-place editing of data
- The DataGrid performs transaction edits (the row is treated as an atom)
- The DataGrid support auto-column generation
- The DataGrid has a RowDetails element (if you like that sort of thing!)
- The DatGrid supports pretty much everything the ListView does, multiple selection modes, styling, etc ...
还有一个重要的:
关于.net - ListView 与数据网格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3174428/