473,385 Members | 1,645 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

treenode within a listview control

Hi,

I wanted to know if there was any way by which I could make a treenode
control an item on my listview control. I have tried doing that..but
the listview control does not allow me to add a treenode to it.

This is allowed:

item1 = new ListViewItem(p1.DisplayName);

This is giving error quite obviously,
item1 = new ListViewItem(t1.Nodes.AddRange(new
System.Windows.Forms.TreeNode[]
{new System.Windows.Forms.TreeNode(p1.DisplayName,
createTreeNodechannels(channelPre,p1.DisplayName))
}));
where t1 is a treenode control.

Any help would be good.

Thanks.

Aug 24 '06 #1
3 2245
:) a bit lazy to dig down but if you can't get it here then ...
http://msdn2.microsoft.com/en-us/library/6dwb14tw.aspx

chanmm

"moni" <mo*******@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Hi,

I wanted to know if there was any way by which I could make a treenode
control an item on my listview control. I have tried doing that..but
the listview control does not allow me to add a treenode to it.

This is allowed:

item1 = new ListViewItem(p1.DisplayName);

This is giving error quite obviously,
item1 = new ListViewItem(t1.Nodes.AddRange(new
System.Windows.Forms.TreeNode[]
{new System.Windows.Forms.TreeNode(p1.DisplayName,
createTreeNodechannels(channelPre,p1.DisplayName))
}));
where t1 is a treenode control.

Any help would be good.

Thanks.

Aug 25 '06 #2
hey,

That link does not have useful information, as it does not tell me abt
adding a a treenode control to a listview control.

Thanks.

chanmm wrote:
:) a bit lazy to dig down but if you can't get it here then ...
http://msdn2.microsoft.com/en-us/library/6dwb14tw.aspx

chanmm

"moni" <mo*******@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Hi,

I wanted to know if there was any way by which I could make a treenode
control an item on my listview control. I have tried doing that..but
the listview control does not allow me to add a treenode to it.

This is allowed:

item1 = new ListViewItem(p1.DisplayName);

This is giving error quite obviously,
item1 = new ListViewItem(t1.Nodes.AddRange(new
System.Windows.Forms.TreeNode[]
{new System.Windows.Forms.TreeNode(p1.DisplayName,
createTreeNodechannels(channelPre,p1.DisplayName))
}));
where t1 is a treenode control.

Any help would be good.

Thanks.
Aug 25 '06 #3
hey,

That link does not have useful information, as it does not tell me abt
adding a a treenode control to a listview control.

Thanks.

chanmm wrote:
:) a bit lazy to dig down but if you can't get it here then ...
http://msdn2.microsoft.com/en-us/library/6dwb14tw.aspx

chanmm

"moni" <mo*******@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Hi,

I wanted to know if there was any way by which I could make a treenode
control an item on my listview control. I have tried doing that..but
the listview control does not allow me to add a treenode to it.

This is allowed:

item1 = new ListViewItem(p1.DisplayName);

This is giving error quite obviously,
item1 = new ListViewItem(t1.Nodes.AddRange(new
System.Windows.Forms.TreeNode[]
{new System.Windows.Forms.TreeNode(p1.DisplayName,
createTreeNodechannels(channelPre,p1.DisplayName))
}));
where t1 is a treenode control.

Any help would be good.

Thanks.
Aug 25 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Byron | last post by:
I'm looking for a way to deny a move from the current listbox item. For instance, if the user is editing the record associated with the current listbox item I want to deny a move within the...
2
by: Sean | last post by:
Hi, I have a treeview and user can right click the treenodes, depending on the nodes, different shortcut menu will appear. I want only the shortcut menu to appear if the point of the right...
2
by: Benny Raymond | last post by:
More problems with this... When I run this code, the main form returns an invalid cast exception as it's executing the line "TreeNode n = (TreeNode) this.Nodes;" Does anyone know what would...
2
by: Craig | last post by:
I'm trying to do this within a control I've created: Cursor.Current = Cursors.WaitCursor; During the initialization of the parent form, my control gets added to the form, and while the control...
0
by: naija naija | last post by:
Hi All, I'm using the TreView Web Control for my MENU. And the Menu is populated from an XML file below. I want a way in which i can manipulate the XML when i want to manage it without having to...
3
by: markaelkins | last post by:
Hi. I am trying to enter a variable in the treenodesrc of a treenode. I am basically trying to send an ID variable into sql to return different records. I've searched everywhere and cannot find the...
5
by: Don | last post by:
I've created a small test class to extend the Treenode object and am having mixed success. In the Treeview's 'BeforeExpand' event I've used code from the help topic "Adding Custom Information to...
0
by: alcurb | last post by:
I have a ListView control populated with 30 items. ListView height only allows you to see 20 rows at a time. I want to drag an item to the bottom of the list (to the last row), but ListView...
0
by: divya1949 | last post by:
Create a windows c# application which will Read a xml file and populate nodes in the treeview. 1 On selection of treenode display the child nodes of that node in listview control 2. ...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.