Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WPF DataGrid from WPF toolkit vs ListView - any benefits?

I know ListView pretty well, but never looked at DataGrid.

My question is simple - if you do not need editing in the list, does DataGrid provide any benefits comparing to ListView? Also, are there disadvantages of using DataGrid (more complex, performance, bugs, hard to style, etc...)?

like image 588
Sergey Aldoukhov Avatar asked Jul 22 '09 23:07

Sergey Aldoukhov


1 Answers

ListView is a read-only control. The usual usage is to synchronize the list with a 'details view' comprised of TextBoxes.

The DataGrid does not lack anything that the ListView possesses, such as multiple selection modes, styling, etc. It does, however, provide support for some features on top of the ListView:

  • In-place editing of data

  • Transactional edits

  • Auto-column generation

  • Setting of RowDetails

Basically the question is - do you want in-place editing? If so, the DataGrid is an obvious choice. If not, the two are quite similar.

like image 54
Charlie Avatar answered Sep 24 '22 07:09

Charlie