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:
how to achieve that.
Solved! Go to Solution.
Hi @hiteshgautam :
Could you tell me :
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)
)
Best Regards,
Bof
Hi @hiteshgautam :
Could you tell me :
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)
)
Best Regards,
Bof
User | Count |
---|---|
179 | |
113 | |
88 | |
44 | |
42 |
User | Count |
---|---|
225 | |
113 | |
112 | |
69 | |
67 |