Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to multiselect DataGridView rows without pressing CTRL key in c#?

How to multiselect DataGridView rows without pressing CTRL key in c#?

Scheduled Pinned Locked Moved C#
csharpwinformshelptutorialquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    naouf10
    wrote on last edited by
    #1

    I am new to c# and using windows forms. I have a DataGridView control on a form and I need to allow a user to multi-select rows (when they click on a row) without using the CTRL key (no keyboard is available - they are using a touch screen) and without using check box column. I have enabled the mutli-select property. Please help me how to do that, Thank you

    OriginalGriffO L 2 Replies Last reply
    0
    • N naouf10

      I am new to c# and using windows forms. I have a DataGridView control on a form and I need to allow a user to multi-select rows (when they click on a row) without using the CTRL key (no keyboard is available - they are using a touch screen) and without using check box column. I have enabled the mutli-select property. Please help me how to do that, Thank you

      OriginalGriffO Offline
      OriginalGriffO Offline
      OriginalGriff
      wrote on last edited by
      #2

      It's not trivial! See here: multiple row selection without control key in C# winforms[^]

      Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
      "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

      1 Reply Last reply
      0
      • N naouf10

        I am new to c# and using windows forms. I have a DataGridView control on a form and I need to allow a user to multi-select rows (when they click on a row) without using the CTRL key (no keyboard is available - they are using a touch screen) and without using check box column. I have enabled the mutli-select property. Please help me how to do that, Thank you

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Why can't you use a checkbox if it is easier? Since it's a "touch screen", I assume the "public" will be using it. The "public" is generally familiar with widgets such as "checkboxes", "radio buttons", "movers", "selected color", etc. and how they work when it comes to "selecting" or "showing" selections. You're not doing anyone any favors if you think you have found a "new" way to show selected items. Anyway, even if you use a checkbox, you can still "hide" it.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups