By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,679 Members | 2,787 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,679 IT Pros & Developers. It's quick & easy.

Scrolling in DataGridView in Visual Studio 2005

P: n/a

I edit a cell in a DataGridView, and then would move to another cell
in the DataGridView using mouse. Then the DataGridView as of now does
scroll down to the last visited cell. But when I try to edit the same
last visited cell, focus gets shifted to the first few visible rows as
per the dimensions set for the DataGridView. To be exact it goes to
the cell in the first row, and the same column.

If I can say it this way, I would like to see same number of Rows
visible at the top, after scrolling down to the selected row / cell
using mouse on the GridView and even before the scrolling was done.
I have tried out many weird ways to do it, but none of them does the
job for me. A thing to add, I refresh my DataGridView every time, I do
a cell value change, which would be followed by cell validating event
and cell Error Check. I get the last recent edited cell in a moment,
but scrolling to the same seems to be a problem for me. I tried
capturing every other event here, but they do not give any solution.

If any of you have worked on the same, let me know any ideas you have
regarding the same.


In DataGrid of VS 2005 and VS 2003, we have a protected method
GridVScrolled, which can be over written in its derived class and then
we can use this to scroll to a particular row in the DataGrid. Refer
to: for more
information on the same implementation.
Jul 21 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
Microsoft has confirmed that this is bug with VS 2005. So we can keep
our fingers crossed till they give us the solution.

Refer the link for more details

Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.