This is a migrated thread and some comments may be shown as answers.

Scrolling is not working properly at all times

0 Answers 42 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Antony
Top achievements
Rank 1
Antony asked on 23 Mar 2017, 08:31 AM

Hi,

I have scrolled the GridView to newly added row using the below code, but it works only in odd number of entries like 1, 3, 5 etc. When entering the new item at second and fourth time, its not working as expected. Please let me know some ideas on this.

private void OnGridViewRowEditEnded(object sender, GridViewRowEditEndedEventArgs e)
{
    if (e.Row is GridViewNewRow)
    {
        Dispatcher.BeginInvoke(new Action(() =>
        {
            if (e.EditedItem != null)
                this.AssociatedObject.ScrollIntoView(e.EditedItem);
        }), DispatcherPriority.ApplicationIdle);
    }
}

No answers yet. Maybe you can help?

Tags
GridView
Asked by
Antony
Top achievements
Rank 1
Share this question
or