Clean Data Table
Usage
Clean Data Table provides a structured layout for displaying tabular data. Use it to create organized, sortable tables with configurable columns, styling, and behavior.
YAML Export
1. Copy the YAML from the component view.
2. Paste it into your Canvas app.
3. Map the Items property to your data source (collection, SharePoint list, Dataverse table, etc.).
4. Configure column mappings in the Gallery control's template.
Column Mapping
In Power Apps, tables are typically implemented using a Gallery control:
TableGallery:
As: gallery
Items: YourDataSource
TemplateSize: 1
Layout: Table
// Map columns in template
Adding Sorting
To add sorting functionality:
1. Create a variable to store the sort column and direction.
2. Use SortByColumns() function in the Gallery's Items property.
3. Add OnSelect handlers to column headers to update the sort variable.
Example:
SortColumn: "name"
SortDirection: "Ascending"
TableGallery:
Items: SortByColumns(YourDataSource, SortColumn, If(SortDirection = "Ascending", Descending, Ascending))
Export Modes
- Safe: Basic table scaffold with headers and row placeholders.
- Advanced: Includes sticky header, selectable rows, sort icons, dense mode, and full style mappings (Pro feature).
Best Practices
- Use striped rows for better readability with large datasets.
- Enable row hover highlight for better UX.
- Consider dense mode for displaying more rows in limited space.
- Use selectable rows for multi-select scenarios.