web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : 5qXQ7Z4TsSn5eNdTQoMDKi
Power Apps - Building Power Apps
Answered

Scrollable buttons with datatable

Like (0) ShareShare
ReportReport
Posted on 2 Nov 2020 12:36:39 by

Hello, community,
I am building a power apps solution where I am using a data table to display data. I am using a sort button on the column header to sort data.

the problem is when I scroll the data table the sort button remains static and does not move with the column header scrolling.

pasting the image below:

hiteshgautam_0-1604320425938.png

how to achieve that.

 

 

I have the same question (0)
  • Verified answer
    v-bofeng-msft Profile Picture
    on 03 Nov 2020 at 09:18:03
    Re: Scrollable buttons with datatable

    Hi @hiteshgautam :

    Could you tell me :

    • Do you want the sort buttons to scroll together when you scroll the data table?

    If so,I'm afraid that is not available.The key is that icon controls cannot be added to the data table. 

    If you need this feature,I suggest you post your ideals in this fourm:

    https://powerusers.microsoft.com/t5/Power-Apps-Ideas/idb-p/PowerAppsIdeas

    As an alternative, I suggest you use a fixed row of buttons to sort the data table.I've made a test for your reference:

    1\My data source

    ClearCollect(
    MyDateSource,
    {Client:"1",Facility:1,StartDate:Date(2020,10,2)},
    {Client:"2",Facility:2,StartDate:Date(2020,10,3)},
    {Client:"2",Facility:3,StartDate:Date(2020,10,4)}
    )

    2\Add two buttons

    Button1-OnSelelct

    UpdateContext({SortDescending1: !SortDescending1}) /*SortDescending1 is my custom variable*/

    Button2-OnSelelct

    UpdateContext({SortDescending2: !SortDescending2})/*SortDescending2 is my custom variable*/

    3\Add data table control and set it's items property to:

    SortByColumns(
    MyDateSource,
    "Client",
    If(SortDescending1,Descending,Ascending),
    "StartDate",
    If(SortDescending2,Descending,Ascending)
    )

    85.gif

    Best Regards,

    Bof

     

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.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 714 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 419 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 243

Last 30 days Overall leaderboard
Loading complete