Selecting a new cell in a DataGridView

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dom

    Selecting a new cell in a DataGridView

    I posted this before, no takers. Trying again.

    Is there anyway to cancel the selection of a new cell in a
    DataGridView? For example, if the user selects a cell with the
    control key down, then I don't want the selection to change.

    Dom
  • Dom

    #2
    Re: Selecting a new cell in a DataGridView

    Well, I decided to answer this question myself, since none of you
    lunkheads seems to know how to do this.

    I created MyDataGridView, which extends DataGridView and overrides the
    OnMouseDown event handler. This new handler fires off two events,
    MouseDownPrep and base.OnMouseDow n, but the second event only fires if
    the result of the first event okays it.

    I guess that's the only way.

    Dom



    On Feb 14, 9:59 am, Dom <dolivas...@gma il.comwrote:
    I posted this before, no takers.  Trying again.
    >
    Is there anyway to cancel the selection of a new cell in a
    DataGridView?  For example, if the user selects a cell with the
    control key down, then I don't want the selection to change.
    >
    Dom

    Comment

    • RobinS

      #3
      Re: Selecting a new cell in a DataGridView

      There's nothing that makes people here want to help you more than being
      insulted.

      RobinS.
      ---------------------------------------------
      "Dom" <dolivastro@gma il.comwrote in message
      news:de63670e-08ed-47cc-a81c-3120606d3923@q7 8g2000hsh.googl egroups.com...
      Well, I decided to answer this question myself, since none of you
      lunkheads seems to know how to do this.

      I created MyDataGridView, which extends DataGridView and overrides the
      OnMouseDown event handler. This new handler fires off two events,
      MouseDownPrep and base.OnMouseDow n, but the second event only fires if
      the result of the first event okays it.

      I guess that's the only way.

      Dom



      On Feb 14, 9:59 am, Dom <dolivas...@gma il.comwrote:
      I posted this before, no takers. Trying again.
      >
      Is there anyway to cancel the selection of a new cell in a
      DataGridView? For example, if the user selects a cell with the
      control key down, then I don't want the selection to change.
      >
      Dom

      Comment

      Working...