Click here to Skip to main content
15,897,273 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HI,


I have a datagridview with 100 records, and i binded records in button click event of wpf application.

problem is when i click on the button, all the records are binding to the datagridview, but the scrollbar is displaying at the last record.

i need to set the scrollbar at the top of the datagridview.
can any one help me?


it is in wpf application.

Regards,
Nagaraju.N
Posted
Comments
Venkatesh Mookkan 14-Dec-10 0:11am    
DataGridView in WPF? Are you using Windows Forms DataGridView control in WPF?

The DataGridView exposes the incredibly unintuitively named FirstDisplayedScrollingRowIndex which you can use to do this.
 
Share this answer
 
You might also want to try ScrollIntoView[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900