Hello Everybody i am new in C# i have a some data that in load i my datagrid but anytime the datagrid has new items loaded my vertical scroll bar stay in the same postion !
How to move up my scroll bar anytime the datagrid has new values/ or i click to a new button
move vertical scrollabar up anytime the datagrid is refresh
CodePudding user response:
The DataGrid class has a method ScrollIntoView
which can be used to scroll a specific item into the visible area of the datagrid.
For example, to scroll to the first item of the datagrid:
datagrid.ScrollIntoView(datagrid.Items[0]);