When I click the columnheader of a listview, maybe a listitem or a subitem, I want to to select all items on the column and maybe have a right click menu with copy options.
Can somebody guide me with this. I've done some searching but failed. :(
Printable View
When I click the columnheader of a listview, maybe a listitem or a subitem, I want to to select all items on the column and maybe have a right click menu with copy options.
Can somebody guide me with this. I've done some searching but failed. :(
Put a PopupMenu on the ListView1_MouseDown event. ;)
Yes, but how can I select all the entries on the columns just by clicking it's column headers? Is this possible?
Ok now I had additional problems. How can I copy the contents of a listview submenu? And another question, is it possible to highlight the submenu? coz it only highlights the listitem.
Wow I realized that im so noob with listview.
Any ideas? or maybe I should change to FlexGrid instead?
What are you calling submenu? Are you talking about each item in the columns? That is ListView1.SelectedItem.SubItems(1) 1 is the number of columns.
It depends which ListView you are using. Comctl32.ocx when you select an item in the first column, only that item will be highlighted. Msomctl.ocx when you select an item in the first column all columns will be highlighted in the same row. ;)Quote:
Originally Posted by zynder
Sorry I mean SubItem not submenu. Is there any way I can only select the column I wanted?
Say I clicked the column headers of a subitem. Is it possible to highlight all entries of the selected column?
Depends... normaly, no. ListView allows selecting only first column. But... you can sub-class it. Search the forums. You'll find many examples.
I can't find samples. Well, im no good at subclassing either.. Thanks for the reply gavio. I will switch to datagrid for now.