On the 1 column scenario, I use the ListView as it is out of the box. I never took the trouble to investigate whether a 1 column DGV, hiding row headers and with some more tweaking (hide grid lines, smaller line height, etc) could be as easy to read as the ListView. It’s a question of “Why bother if ListView gives me exactly what I need?”
I understand a lot of people doesn’t use ListView at all and prefer to use DGV in all scenarios. One of the reasons is native ListView doesn’t support DataBinding. As I said earlier in this thread, I use a ListView version that supports Data Binding (btw VWG ListView also supports DataBinding). So I don’t face this problem. On the other hand, some people prefer to use DGV only when they must, arguing it’s slower than ListView. This might have been an issue when .NET 2.0 was released. Computer performance increased a lot in the last 10 years so I don’t believe this is an issue nowadays, except if you are loading thousands of rows.
Thank you so much for taking the time to reply in such detail and for the useful links and your project. I’ll have to study it and I’ll get back to you.
For the moment, I understand that the most obvious (and fair) comparison of DataGridView with ListView is when ListView is is Detail mode. So, in case 3, where you say that you’d use a 1-column ListView in Detail mode, why do you find the ListView provides superb readability compared to DataGridView? What is making the DGV less readable to you?
That’s a tricky question…
First of all, lets put aside hierarchical data. Next, let’s presume both controls are data binding capable.
Now consider the need for a detail panel. If I have a master list, do I need a detail panel to show or edit my items?
DGV is kinda replacement for Excel.
I would prefer DataGridView to
1) Show tabular data (data organized in columns)
2) In place editing of objects with more than one property.
Provided all object properties fit comfortably on the available screen space (when your user doesn’t have to use the horizontal scroll bar), inline editing avoids the use of an editing panel.
Note – If you use a DGV as a master list, I presume you are showing more than a few properties and the DGV will be widish. In that case, most of the times the best location for the detail panel is below the DGV. This means te DGV can’t be very tall, and your users will have to use the scroll bar. If the DGV isn’t that wide, you can use a full height DGV on the left side, and put the detail panel on the right side of the DGV. This is an interesting design that opens a number of possibilities, depending on the specifics of your object. But that’s a bit besides the point.
ListView is file system manager-style interface with four view modes: LargeIcon, SmallIcon, List, and Detail.
I would definitely prefer ListView when
3) I need and editing panel anyway and the master list displays just 1 column (a few properties that can be put in a single string).
Note – For this scenario (say a list of user names), I would use the ListView in Detail mode. It has a very clean presentation (you can even hide grid lines) and provides superb readability. I presume I could use a full height ListView on the left end, with the editing panel on the right, possibly with… again, there are a lot of possibilities. And that’s besides the point.
4) I need the ability to show the list using icon view modes or list mode.
For hierarquical data, use tree like controls; ask google about
or browse these projects
I attach a sample WindowForms ListView project that illustrates all view modes. I hope I can convert it to Wisej soon enough 🙂
This is a general question, I believe more for you, Tiago, to answer, but it could be interesting to more people.
Since the days of VWG, I used to hear about the goodies of ListView, but I had failed to see in what way it is so different from DataGridView. So, I’d like to ask in which kind of scenarios do you favour ListView over DataGridView? Any examples from real life applications would be very much appreciated.
I think we should add data binding to as many controls and properties as possible, and the ListView is the perfect candidate. It will be added after the release, I will get back to you directly about using your implementation.
I know WindowsForms’ ListView doesn’t support DataBinding. Will the Wisej’s ListView support DataBinding as VWG does? Personnaly I don’t care as I have a BoundListView that runs under Windows Forms (I sent you the code, along with the BoundTreeView) and I hope it will be quite easy to port to Wisej.