Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

wpf scoll to on new item datagrtid

if (mainDataGrid.Items.Count > 0)
{
    var border = VisualTreeHelper.GetChild(mainDataGrid, 0) as Decorator;
    if (border != null)
    {
        var scroll = border.Child as ScrollViewer;
        if (scroll != null) scroll.ScrollToEnd();
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #wpf #scoll #item #datagrtid
ADD COMMENT
Topic
Name
1+3 =