Notifications
Announcements
Is anyone aware of a way to force a Gallery of items to scroll directly to the top? For example, I have a gallery that typically contains 50 to 100 job details and only 12 can show on the screen at a time. Users can scroll or page down the list to find the desired job. I would like to have a button or automatically force the scroll back to the top record and have not found a way to do this. If a method does not exist, this would be a great feature to add (Back to Top).
Hello @KarlHoffmaster,
You should be able to scroll to the top element of the gallery by setting the following formula in Gallerie's "Default" property:
First(YourSource)
Where YourSource is the source name your gallery is bound to. Note howether that the scroll to top event will be triggerend when that property changes. What you could do is to set the Default element to the currently selected item and then to the first item. Example:Button1.OnSelect=Set(dd, Gallery1.Selected);Set(dd, First(YourSource))
Gallery1.Default=dd
Clicking on the button should cause the Gallery1 to scroll all the way up.
Has anyone gotten this to work? It did not work at all. If I understood correctly.....I applied your code to my button, then back on my gallery Default property, I put in dd. The result was when I click on the button, it just clears out the selected item.
Did you test this on your end before posting?
This is how I got it to work. I created a "Search" text box to enter the item to search for to bring to the top of the gallery. For my app, it is a 6 digit job number. I set my gallery's "Default" value to the following: IF(Len(JobSearch.Text) = 6, First(Sort(Filter(DATA_Source, JobSearch_txt.Text = JobNumber),JobNumber , Ascending)), First(Sort(Filter(DATA_Source, Original Filter Criteria), SORTField, Ascending)))
I tried all of your recommended solutions and it didn't work properly. The solution for me was to just simply reset the gallery by changing the OnVisible property of the screen to Reset(YourGallery). Couldn't find this easy solution anywhere so use it to your advantage.
Set Gallery Default to First(WhatYouHaveInItemsProperty)
That worked for me
Reset(Gallery) on onvisible property of gallery
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 717 Most Valuable Professional
Michael E. Gernaey 329 Super User 2025 Season 2
Power Platform 1919 268