Click here to Skip to main content
12,352,167 members (32,161 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# ASP.NET
Can someone please tell me how to create a binary treeview in c#. I want to build a tree like in this link for my project. The link is[^]

On the left hand site there is a binary tree structure for which I have to write code for in C#.

So please tell me how to create a binary tree for that.

Thanks in advance!

Added the link from the repost of this question!
Posted 21-May-12 0:14am
Edited 21-May-12 1:20am
Manfred R. Bihy 21-May-12 6:48am
The link you provided does not work. Please fix it!
Manfred R. Bihy 21-May-12 7:15am
When I told you to fix your link, I didn't say anything about reposting you question. Don't do that again!
Manfred R. Bihy 21-May-12 7:18am
The tree that is depicted by the website you linked to is not a binary tree. You better learn to ask the right questions otherwise you won't receive any correct answers!
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Since you didn't frame your question well you did not receive any useful information. First you failed by posting a non functional link and the you failed by thinking you could just post another question. From the link in your repost you could have easily seen that what you are looking for is a treeview. That word is in the URL.

Anyhow here is the MSDN information for the ASP.NET TreeView control[^].

Here is a tutorial:[^].

See here on CP: A simple Binary Search Tree written in C#[^].

or here:[^]

and not to forget here:[^].

Let's see what the Microsofties have:[^].

That should just about do it. Any doubts left?


Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Manfred R. Bihy 21-May-12 7:26am
OP was after a treeview and not a binary tree. I corrected my solution. Feel free to follow. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.160621.1 | Last Updated 21 May 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100