DataGrid AutoScroll

  • Thread starter Thread starter Stan Sainte-Rose
  • Start date Start date
S

Stan Sainte-Rose

Hi,
First, happy new year 2004 :-)

I have a datagrid that displays 10 rows.
I would like when I add new rows the datagrid automatically scrolls showing
the 10 last rows.
Currently, the new rows are added but I have to use the scroll bar to see
them.
Thanks for your suggestions.

Stan
 
Can you try using the Select Method to select the last added row ? that way
you would automatically have the last 10 rows displayed


HTH
Manasvin
 
Hi Mansvin,
I don't want to select the 10 last added rows and display them.
In fact, I have a winform that contains a datagrid and some textboxes that
allow the users to add datas to the datagrid.
My datagrid displays 10 rows and when the user adds more than 10 rows he can
not see the last row he added because
the scrollbar doesn't automatically move and he has to move manually the
scrollbar to see the last row he adds.

So, how can I avoid this ?

Stan
 
The Select allows u to select a paraticular row. If you select the last row
you added after the add button event, the grid should automatically scroll
to focus on the new selected record

HTH

Manasvin
 
you could also try setting the currentcell property to a cell on the new row

Manasvin
 
Back
Top