Jump to content
  • Advertisement
Sign in to follow this  

DatagridView vs TreeView

This topic is 2343 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a program that scans source code for issues.

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.

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,


Share this post

Link to post
Share on other sites
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);

Share this post

Link to post
Share on other sites
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.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!