cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lipsita
Frequent Visitor

On Click Scroll to top of the gallery

My requirement is on click of some icon take the scroll to the top of the screen. Can anyone help me to achieve this.

Thanks in advance

4 REPLIES 4
LRVinNC
Resident Rockstar
Resident Rockstar

Take a look at this post (with specific references to galleries on the second page of responses) and see if it helps with your specific case:  https://powerusers.microsoft.com/t5/General-Discussion/Go-to-Top-part-of-screen/td-p/90877

LRVinNC

------------------
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
v-xida-msft
Community Support
Community Support

Hi @lipsita ,

Do you want to scroll to top of your Gallery when you click a Icon button?

 

Based on the needs that you mentioned, I afraid that there is no direct way to achieve your needs. As an alternative solution, I have made a test on my side, please take a try with the following workaround:5.JPG

 

6.JPG

Set the OnStart proeprty of the App control or OnVisible property of the first screen of your app to following:

Set(IsReset, true)

Set the Items proeprty of the Gallery to following:

If(
    IsReset,
    SortByColumns(Filter('20190325_case13', StartsWith(Title, TextSearchBox1.Text)), "Title", If(SortDescending1, Descending, Ascending))
)

On your side, you should type:

If(
    IsReset,
    'Type your Gallery Items formula here'
)

Set the OnSelect property of the "Up to Top" button to following:

Set(IsReset, false);
Refresh('20190325_case13');
Set(IsReset, true)

On your side, you should type:

Set(IsReset, false);
Refresh('YourDataSource');
Set(IsReset, true)

Please check the following GIF screenshot for more details:Test.gif

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thanks for posting in the community @lipsita - can you review the above replies and update the thread if they were helpful? 

 

Thank you,

 

@Anonymous 

JADANL123
Advocate I
Advocate I

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. The above mentioned solution is also not recommended for the app performance.

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Kudoed Authors
Users online (2,249)