Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 856615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:15:44+00:00 2026-05-15T08:15:44+00:00

I am using a in-place editable listview control for a project. The editable listview

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T08:15:45+00:00Added an answer on May 15, 2026 at 8:15 am

    .NET specifically adds this functionality to a ListView. Don’t ask me why.

    To get rid of it, listen for NM_DBLCLK reflected notification, and in the handler for that do this::

    NativeMethods.NMHDR nmhdr = (NativeMethods.NMHDR)m.GetLParam(typeof(NativeMethods.NMHDR));
    
    switch (nmhdr.code) {
    case NM_DBLCLK:
        // The default behavior of a .NET ListView with checkboxes is to toggle the checkbox on
        // double-click. That's just silly, if you ask me :)
        if (this.CheckBoxes) {
            // How do we make ListView not do that silliness? We could just ignore the message
            // but the last part of the base code sets up state information, and without that
            // state, the ListView doesn't trigger MouseDoubleClick events. So we fake a
            // right button double click event, which sets up the same state, but without
            // toggling the checkbox.
            nmhdr.code = NM_RDBLCLK;
            Marshal.StructureToPtr(nmhdr, m.LParam, false);
        }
        break;
    

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to notify user of mobile as particular event take place,Using notification bar
i have read in more then one place that using NHibernate's Identifier as Primary
I place using namespace in a view code behind but i can't call any
I'm using the place geometry manager to make draggable widgets. I've noticed however, that
I'm using jqGrid with cell editing and a datepicker. All works well, except that
I have an image that I'm trying to place using :before. I want the
Hi I am using the Place Search Requests from google: A Place Search request
I am using the Place Searches from the Google Places API and wanted to
I am showing place by using pin image on google map in android by
Curious if anybody has considered using EnumMap in place of Java beans, particularly value

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.