Scroll Bar should move down automatically

  • Thread starter Thread starter Irfan
  • Start date Start date
I

Irfan

hi,
In the datagridview, is it possible that when a datagridview loads it
scrolls down automatically to show the last rows?

I have a datagridview, in which the user has to modify one the columns of
the LAST row every time it loads, so he has to always
scroll down, which is a bit of pain.

Is there any event that i can catch.

TIA
Irfan
 
Something like

dataGrid1.Select(dataSet1.Tables[0].Rows.Count);
dataGrid1.CurrentRowIndex = dataSet1.Tables[0].Rows.Count;
dataGrid1.Focus();

should probably move focus to the last row of the grid

--
--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
 
thanks
It was similar to that.

Datagridview1.FirstDisplayedScrollingRowIndex = dataGridview1.rows.count-1


Irfan






John Timney (MVP) said:
Something like

dataGrid1.Select(dataSet1.Tables[0].Rows.Count);
dataGrid1.CurrentRowIndex = dataSet1.Tables[0].Rows.Count;
dataGrid1.Focus();

should probably move focus to the last row of the grid

--
--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com


Irfan said:
hi,
In the datagridview, is it possible that when a datagridview loads it
scrolls down automatically to show the last rows?

I have a datagridview, in which the user has to modify one the columns of
the LAST row every time it loads, so he has to always
scroll down, which is a bit of pain.

Is there any event that i can catch.

TIA
Irfan
 
Back
Top