Re: DataGridView.CurrentCell scrolling

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




Thanks for the reply. My reason for NOT wanting to autoscroll is this:

The cells in my grid are tall and I am using a context menu on a
DataGridView. If the "right-clicked" cell is not in the top row or is
partially out of view, the context menu appears where they clicked, but the
cell moves to the top of the grid.

Now it looks like they right-clicked on the cell beneath the actual target
cell.

I supposed I could reposition the context menu with the cell. I'm not sure
how to do that, but I haven't tried yet.

--
stullhe104


"Ralph" wrote:


"Herb" <stullhe104@xxxxxxxxxxxxxxxx> wrote in message
news:FB107406-7D01-4CA7-8D9F-601117BD4E7E@xxxxxxxxxxxxxxxx
The documentation for DataGridView.CurrentCell states:
"When you set a cell as the current cell, it will scroll into view if it
is
not currently displayed."

Is there any way to stop this behavior?


No. Not with that control. It is a 'feature'.

When you think about it, why would you want any other behavior? If you want
to track unique cells without User awareness take a look at Bookmarks. (I
think it takes Bookmarks.)

Which leads to the second part - this is a newsgroup dedciated to classic VB
users. You need to post to a dotnet newsgroup. (They will have 'dotnet' in
the title.)

-ralph



.



Relevant Pages

  • Re: RISC OS programs on PCs
    ... with menu on a cell would give you a menu which contained the top level ... Those are all context and position sensitive. ... is in a frame you get 'view frame info' instead of 'view page info'. ... in relation to file properties etc. but not often elsewhere. ...
    (comp.sys.acorn.programmer)
  • Re: 3vl 2vl and NULL - the dead end posting
    ... I asked what one of those was a while back and ended up thinking of a tuple as like a "cell" in a spreadsheet - the intersection of column and row - the container for a value or set or scalar or relation. ... I don't mean to confuse anyone. ... The term attribute is often used in this context; speaking a little loosely, it corresponds to either a column name or the place where a value is stored in a tuple as part of a relation. ... Tut, tut, tut. ...
    (comp.databases.theory)
  • Re: Chez Watt Re: Common ancestor between man and ape
    ... 'Cell' is a word with a broad range of applications, ... It was merely applied to a new context. ... the word "ape" by scientists in their own scientific context. ... substances placed in an electrolyte. ...
    (talk.origins)
  • Re: Chez Watt Re: Common ancestor between man and ape
    ... 'Cell' is a word with a broad range of applications, ... It was merely applied to a new context. ... the word "ape" by scientists in their own scientific context. ... substances placed in an electrolyte. ...
    (talk.origins)
  • Re: Chez Watt Re: Common ancestor between man and ape
    ... 'Cell' is a word with a broad range of applications, ... It was merely applied to a new context. ... the word "ape" by scientists in their own scientific context. ... substances placed in an electrolyte. ...
    (talk.origins)