954,549 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Groups in Listvew

Hi All,
Can I have a Listvew in which Groups have ability to expand or shrink?
Now I Generate a Listviw in which groups are expand always, in Vb.Net.
for i as integer=0 to Number
'Add Items
ListView1.Items.Add(i)
'Add tow SubItems
ListView1.Items(i).SubItems.Add(1)
ListView1.Items(i).SubItems.Add(2)
next
'Generat a Group
ListView1.Groups.Add(New ListViewGroup("BaSalam",
HorizontalAlignment.Left))
'Add Items to Group
For j = 0 To clsShareParam.NumPoint - 1
ListView1.Items.Item(i).Group = ListView1.Groups(1)
Next

A.Najafi
Newbie Poster
8 posts since Sep 2009
Reputation Points: 10
Solved Threads: 0
 

No, there is no built in functionality in .Net for adding these features to a listview control. Although if you google the subject you can find some examples where people added coding in an attempt to add these features but I wouldnt even recommend it; all the ones I looked at were very buggy and caused memory problems. You would be better off purchasing a 3rd party control if this is a must have feature or looking for a different control that fits your needs.

TomW
Posting Whiz
343 posts since Sep 2009
Reputation Points: 84
Solved Threads: 48
 

how about using a treeview instead?

GeekByChoiCe
Master Poster
721 posts since Jun 2009
Reputation Points: 208
Solved Threads: 168
 

Hi,
Thanks allot.

A.Najafi
Newbie Poster
8 posts since Sep 2009
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: