views:

29

answers:

2

Hi

i need some help for my listview element, I want to use listview with groups. But i want to make the group headers not selectable, i want to use them as seperator?

How can i do this?

ty

A: 

Solution:

alt text

// Adds a new group that has a left-aligned header
listView1.Groups.Add(new ListViewGroup("List item text", HorizontalAlignment.Left));

You can find more information about it on http://msdn.microsoft.com/en-us/library/ezh1batz.aspx

Svisstack
no this doesn't work, they are still selectable if i use keyboard to scroll through the list
David
A: 

Can u send me clearly what u need nu? or else send me the code?

Lingesh
ok, i've ad this.lstView.SelectedIndexChanged event listener, also i have two groups i need every index from each item, if I debug the index with ((ListViewItem)lstView.SelectedItems[0]).Index in the event I get an exception if the group header is selected, so I want to disable the selecting of group headers.
David