I am using a in-place editable listview control for a project.
The editable listview adds a ‘SubItemClicked’ event so that each ‘cell’ can be edited.
lstSD2.SubItemClicked += new ListViewEx.SubItemEventHandler(lstSD2_SubItemClicked);
I also have the listview checkboxes enabled with a ‘ItemChecked’ event.
The problem is that once the ‘ItemChecked’ event is enabled double-clicking on any row fires the ‘ItemChecked’ event and prevents the ‘SubItemClicked’ event from firing.
Is there a way to enforce the need to actually ‘check’ the listview checkbox instead of firing whenever the row is double-clicked?
One possible solution is to disable the listview’s ‘DoubleClickActivation’:
this.lstShuntData2.DoubleClickActivation = false;
The main drawback to this is that the users may find the listview a little too sensitive to any mouseclick.
.NET specifically adds this functionality to a ListView. Don’t ask me why.
To get rid of it, listen for
NM_DBLCLKreflected notification, and in the handler for that do this::This is one of the many problems that ObjectListView solves for you. Even if you don’t use the whole project, you can look at the source code and figure out how to do things yourself.