I can connect to the DB, create the dataadapter, populate a data set.
And I know how to add nodes to a treeview. The problem is how to use
the dataset to populate a treeview.
I have not found a Windows Forms C# example that can handle an
unspecified level of node nesting and Parent = Child. See child rows
15.
I would really appreciate the help.
Thank you.
I have a SQL Server 2005 table containing this data shown below.
Child...Parent...Depth.....Hierarchy
1.........NULL.....0.........01
2..........1.......1..........01.02
5..........2.......2..........01.02.05
6..........2.......2..........01.02.06
3..........1.......1..........01.03
7..........3.......2..........01.03.07
11.........7.......3..........01.03.07.11
14.........11......4..........01.03.07.11.14
12.........7.......3..........01.03.07.12
13.........7.......3..........01.03.07.13
8..........3.......2..........01.03.08
9..........3.......2..........01.03.09
4..........1.......1..........01.04
10.........4.......2..........01.04.10
15.........NULL....0..........15
15.........15......1..........15.15
16.........15......1..........15.16
18.........16......2..........15.16.18
17.........15......1..........15.17
On Thu, 18 Oct 2007 00:59:59 GMT, Joe Cool <jo*****@home.netwrote:
>On Thu, 18 Oct 2007 00:42:26 GMT, xm******@yahoo.com wrote:
>>Since you are already using a treeview maybe you can answer this
question for me. I am new to C# and am trying to populate a treeview
from a SQL 2005 table. Do you have s snippit of code that will do
that or know a URL where I can see how?
Do you know how to either a) read a SQL2005 table, or b) populate a
treeview?
>>
I would really appreciate the help.
Thanks
On Wed, 17 Oct 2007 23:37:35 GMT, Joe Cool <jo*****@home.netwrote:
>>>Let's say I have a Treeview control on a form. Each leaf node in the
Treeview has a ContextMenuStrip, each with one ToolStripMenuItem, and
all ToolStripMenuItems Click event is handled by a comment event
handler.
How do I determine which Treeview Node signalled the menu event in the
common event handler?