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. Windows Forms
  4. Disabling cell selection in DataGrid

Disabling cell selection in DataGrid

Scheduled Pinned Locked Moved Windows Forms
2 Posts 2 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.
  • J Offline
    J Offline
    JW738
    wrote on last edited by
    #1

    I am using a DataGrid (yes, I know I should be using DataGridView by now!) and I want to disable cell selection. I am talking about the text in a cell getting selected when the users clicks in a cell. I don't want this because I am using a context-menu on the DataGrid that should appear when user right-clicks on a cell, and this doesn't work when user right-clicks on a selected cell because then the Windows edit menu pops up instead.

    L 1 Reply Last reply
    0
    • J JW738

      I am using a DataGrid (yes, I know I should be using DataGridView by now!) and I want to disable cell selection. I am talking about the text in a cell getting selected when the users clicks in a cell. I don't want this because I am using a context-menu on the DataGrid that should appear when user right-clicks on a cell, and this doesn't work when user right-clicks on a selected cell because then the Windows edit menu pops up instead.

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

      You should try SelectionMode property of datagridview. HTH

      Jinal Desai - LIVE Experience is mother of sage....

      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