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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. Selecting multiple rows in an MSHFlexGrid

Selecting multiple rows in an MSHFlexGrid

Scheduled Pinned Locked Moved Visual Basic
question
2 Posts 1 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.
  • B Offline
    B Offline
    Barry True
    wrote on last edited by
    #1

    I've got an MSHFlexGrid on a form and it is set up to not highlight cells or rows when the user clicks. Howver, I've put code behind the click event to check the background color of the cell in which the user clicked. If it is not yellow, I set the background color of all cells in the row to yellow. If it is yellow (i.e., selected) I set the background color back to white. What I want to do is to allow the user to select multiple rows by holding the shift key down while they click but this doesn't seem to be working. When the shift key is held down during the click event, the row that is selected appears to be the same row that was selected when the first cell was clicked in rather than the actual row in which the mouse click event occurred. Does anyone know how I can get tis to work the way I described?

    B 1 Reply Last reply
    0
    • B Barry True

      I've got an MSHFlexGrid on a form and it is set up to not highlight cells or rows when the user clicks. Howver, I've put code behind the click event to check the background color of the cell in which the user clicked. If it is not yellow, I set the background color of all cells in the row to yellow. If it is yellow (i.e., selected) I set the background color back to white. What I want to do is to allow the user to select multiple rows by holding the shift key down while they click but this doesn't seem to be working. When the shift key is held down during the click event, the row that is selected appears to be the same row that was selected when the first cell was clicked in rather than the actual row in which the mouse click event occurred. Does anyone know how I can get tis to work the way I described?

      B Offline
      B Offline
      Barry True
      wrote on last edited by
      #2

      I finally figured out my problem. I was looking at the .row property instead of the .rowSel property. Once I figured this out the rest was relatively easy.

      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