Listview columnclick outside of columns
The listview header is a separate object / window inside the listview control. Unfortunately the listview does not contain mouse events with which you can grab any activity in the header (except the obvious ones). You will need to create an extended version of the listview control and use some lower level unmanaged methods to get to that window and make these events available.
You can start here: http://www.codeproject.com/KB/list/HeaderRightClick.aspx .
source to share
Even at a lower level, this is not easy to do. This article relies on the MenuOpening event, which is not dispatched when the user clicks on the title. In fact, the ListView does not receive any notification when the header (left) is clicked outside the columns.
The ObjectListView (an open source wrapper around the .NET WinForms ListView) has all the necessary plumbing you already need and can be easily modified to do this.
In the HeaderControl.cs file, find the WndProc () method and add it to the case statement, which is:
case 0x0201: //WM_LBUTTONDOWN
if (this.ColumnIndexUnderCursor == -1) {
System.Diagnostics.Debug.WriteLine("header click on no column");
};
break;
source to share