cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

Scrollable buttons with datatable

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.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

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

 

View solution in original post

1 REPLY 1
Community Support
Community Support

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

 

View solution in original post

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (69,889)