DatagridView vs TreeView

Started by
1 comment, last by ApochPiQ 11 years, 11 months ago
I have a program that scans source code for issues.

Currently:
Right now it outputs the information to a treegrid view, each main node being the problems name and each subnode being a source file.
When the user clicks on a file a seperate tree view shows information on the file, the problem, and how to fix it.

The only problem is when there are a large amount of problems it seems a little impractical to go through every node and expand each one and read the individual problems.

Proposed:
So I was thinking a better way to do it might possibly be a datagrid view.
I was thinking having the following columns "Issue" "File Name" "Code Snipplet".
This datagrid view would be connected to a dataset.
The only problem I see with this is that I won't have all of the nice icons that I have now associated with the pages.

Overall for my situation which would be the most practical and show the information the best?

I basically am just asking for some opinions on this before modifying all of this code.
Thanks in advance,

CoderWalker
If this post was helpful please +1 or like it !

Webstrand
Advertisement
If you store the image in the DB that you want along with the rest of the data then it is easy.


private void createGraphicsColumn()
{
Icon treeIcon = new Icon(this.GetType(), "tree.ico");
DataGridViewImageColumn iconColumn = new DataGridViewImageColumn();
iconColumn.Image = treeIcon.ToBitmap();
iconColumn.Name = "Tree";
iconColumn.HeaderText = "Nice tree";
dataGridView1.Columns.Insert(2, iconColumn);
}
It's kind of hard for me to arrive at an opinion on this without knowing anything about what the data is, how it's formatted, how I would typically want to browse it, and so on. I could see use cases where both options make sense, but since I don't know much about your tool, it's hard to think which one might be preferable.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

This topic is closed to new replies.

Advertisement