Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Expandable listview row in .NET

row expandable listview heirarchy vb.net

  • Please log in to reply
8 replies to this topic

#1 Imless

Imless

    CC Regular

  • Member
  • PipPipPip
  • 44 posts
  • Location:CDOC, Philippines
  • Learning:C, Java, C++, C#, PHP, (Visual) Basic, JavaScript, PL/SQL, Visual Basic .NET, Transact-SQL, VBScript

Posted 22 August 2012 - 08:09 AM

Please I need idea on how to make an expandable listview row. As i click the row, it will expand ! Just need your help guys.
  • 0

#2 AceInfinity

AceInfinity

    CC Addict

  • Senior Member
  • PipPipPipPipPip
  • 313 posts
  • Programming Language:C, C++, C#, Perl, Visual Basic .NET, Assembly, VBScript, Others

Posted 22 August 2012 - 08:13 PM

Row? So what would the ones look like which are not expanded?

You're going to have to create your own ListView control to do this.
  • 0

Microsoft MVP (2012) - .NET Programming | ®Crestron DMC-T Certified Programmer
Posted Image


#3 BlackRabbit

BlackRabbit

    CodeCall Legend

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 3871 posts
  • Location:Argentina
  • Programming Language:C, C++, C#, PHP, JavaScript, Transact-SQL, Bash, Others
  • Learning:Java, Others

Posted 22 August 2012 - 11:44 PM

It sounds to me more like a treeview control, :D

it does just what you want, you just need to learn how to customize the layout so you can see it as you need.

Here is the MSDN page for TreeView Control , you can find it in the toolbox, its easy to set up and use
  • 0

#4 Imless

Imless

    CC Regular

  • Member
  • PipPipPip
  • 44 posts
  • Location:CDOC, Philippines
  • Learning:C, Java, C++, C#, PHP, (Visual) Basic, JavaScript, PL/SQL, Visual Basic .NET, Transact-SQL, VBScript

Posted 23 August 2012 - 12:33 AM

Maybe Treelistview but ... I am looking for a result like this:

+ one | two | three |
- four | five | six
- seven | eight | nine |
+ ten | eleven | twelve |

Treeview cant do this I think.

Edited by Imless, 23 August 2012 - 12:39 AM.

  • 0

#5 AceInfinity

AceInfinity

    CC Addict

  • Senior Member
  • PipPipPipPipPip
  • 313 posts
  • Programming Language:C, C++, C#, Perl, Visual Basic .NET, Assembly, VBScript, Others

Posted 23 August 2012 - 07:28 PM

Maybe Treelistview but ... I am looking for a result like this:

+ one | two | three |
- four | five | six
- seven | eight | nine |
+ ten | eleven | twelve |

Treeview cant do this I think.


A "TreeListView"..?

No, a TreeView control can do that.
  • 1

Microsoft MVP (2012) - .NET Programming | ®Crestron DMC-T Certified Programmer
Posted Image


#6 Imless

Imless

    CC Regular

  • Member
  • PipPipPip
  • 44 posts
  • Location:CDOC, Philippines
  • Learning:C, Java, C++, C#, PHP, (Visual) Basic, JavaScript, PL/SQL, Visual Basic .NET, Transact-SQL, VBScript

Posted 24 August 2012 - 08:22 AM

Each root in Treeview can only have one node, i mean one column node. So it would just be like this:

+ one
| two |
| three |
+ four
  • 0

#7 AceInfinity

AceInfinity

    CC Addict

  • Senior Member
  • PipPipPipPipPip
  • 313 posts
  • Programming Language:C, C++, C#, Perl, Visual Basic .NET, Assembly, VBScript, Others

Posted 24 August 2012 - 05:14 PM

Each root in Treeview can only have one node, i mean one column node. So it would just be like this:

+ one
| two |
| three |
+ four


No.. :worry:

That is a false statement. Quick example:

treeView1.Nodes.Add(new TreeNode("Node1"));
treeView1.Nodes[0].Nodes.Add(new TreeNode("SubNode1"));
treeView1.Nodes[0].Nodes[0].Nodes.Add(new TreeNode("ChildSubNode1"));
treeView1.Nodes[0].Nodes[0].Nodes[0].Nodes.Add(new TreeNode("SuperChildSubNode1"));

Posted Image
  • 0

Microsoft MVP (2012) - .NET Programming | ®Crestron DMC-T Certified Programmer
Posted Image


#8 Imless

Imless

    CC Regular

  • Member
  • PipPipPip
  • 44 posts
  • Location:CDOC, Philippines
  • Learning:C, Java, C++, C#, PHP, (Visual) Basic, JavaScript, PL/SQL, Visual Basic .NET, Transact-SQL, VBScript

Posted 26 August 2012 - 10:59 PM

-Node1
SubNode1 | ChildSubNode1 | SuperchildNode1
+Node2
+Node3


Is it possible Ace using Treeview?

Merging the 3 rows(Subnode, ChildSubnode and the supersubnode) in 1 row only.
  • 0

#9 AceInfinity

AceInfinity

    CC Addict

  • Senior Member
  • PipPipPipPipPip
  • 313 posts
  • Programming Language:C, C++, C#, Perl, Visual Basic .NET, Assembly, VBScript, Others

Posted 27 August 2012 - 05:10 AM

-Node1
SubNode1 | ChildSubNode1 | SuperchildNode1
+Node2
+Node3


Is it possible Ace using Treeview?

Merging the 3 rows(Subnode, ChildSubnode and the supersubnode) in 1 row only.


Why would you do that though?

Here's what you initially said:

Each root in Treeview can only have one node


Which isn't true.

Instead of having them like that, what's wrong with just having them all as nodes?
  • 0

Microsoft MVP (2012) - .NET Programming | ®Crestron DMC-T Certified Programmer
Posted Image






Also tagged with one or more of these keywords: row, expandable, listview, heirarchy, vb.net

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download