cancel
Showing results for 
Search instead for 
Did you mean: 

OnSelect for header row in Data Table

Would like the ability to be able to have some action occur whenever the HEADER row of a Data Table is clicked/touched.  When this occurs should also be able to know where in the header the click occurred (ie: which column header).

 

Most likely this would have an OnSelect property or something.

 

Main use case is the ability to be able to let the user (for instance) sort the table in the table (ascending/descending) by the column header that was clicked (under app control - it would decide what to do and which column).

 

Currently the only way this can be done is to look at the OnSelect property for each column/field in the table, which only appears to fire whenever an actual row that has data (not the header) is clicked.  It would be acceptable to have this (optionally perhaps) fire when the header row is selected - assuming there is the ability to know it was the header row and not one of the rows of data.

 

Status: Under Review

Updating status and adding @anees

Comments
Power Apps Staff
Status changed to: Under Review

Updating status and adding @anees

Level: Powered On

Yes NEEDED,  specifically need to be able to determine what column was selected and perform a sort operation, and toggle between sort ascending and descending.

Level: Powered On

@toddbailey I have impelemented a sort method which alternates between ascending and descending as follows - 

On a filter icon within the column title, add the following OnSelect function

ClearCollect(SortedList,Sort({Source},Title,If(sortTitle,SortOrder.Descending,SortOrder.Ascending)));
Set(sortTitle,!sortTitle)

@CWesener this feature would be greatly appreciated as it will complete the navigation of our apps. We have a dedicated list for displaying and filtering more content than the main page, and would like to have the title link to an edit form of the selected item.

 

Regards,

Sam