This repository has been archived by the owner on May 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 76
Scroll to selected item #137
Labels
Comments
Hi, such a feature not exists for now, but would be nice to implement. Will implement when i have free time |
Thanks! Really looking forward. Possible implementation in DataGrid.xaml.cs:
Then methods can be easily used from codebehind in ItemSelected event handlers:
(Not tested yet) |
If someone is interested, here's some dirty workaround:
using System.Reflection;
ListView object is cached within the utility class. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello,
first of all, Xamarin.Forms.DataGrid is a great thing, thanks!
I'm struggling with making an element visible. Here's my scenario:
I have a long collection of items. When I set SelectedItem in viewmodel, DataGrid selects that item.
However, if newly selected item wasn't visible before, DataGrid does not scroll to make it visible.
In ListView there is a ScrollTo method with does excatly what I want, for example:
listView.ScrollTo(vm.ItemsCollection.LastOrDefault(), ScrollToPosition.Start, false);
Is this possible with Xamarin.Forms.DataGrid?
The text was updated successfully, but these errors were encountered: