Progamatically Scroll DataGrid Control

ABoy's Avatar, Join Date: Apr 2008
Newbie Member
HI

I'm using a Win forms data grid control and want to progamatically select a record in it. I have done it and the problem I have is, to get in to the auto selected row user have to scroll the grid.

I need to find a method to automatically scroll the grid for the selected record so the user don't have to do any action to get to the position?

Thanks
0
excavator's Avatar, Join Date: Apr 2008
Newbie Member
you can use datagrid.currentcell property
Code:
datagrid.CurrentCell = New DataGridCell(r, c)
where r = index of the selected row and c = index of the column

hope this help
0
ABoy's Avatar, Join Date: Apr 2008
Newbie Member
Cool, that did help thanks Excavator