Here is a small hack to add bold column headings to a gallery and display tabular data.
Hope this helps someone, and please let me know if there is an easier way of doing this.
The editing process...
...the result
Solved! Go to Solution.
Very creative idea, the headings get added just like another row to the collection!
Another pattern that I've seen was to use two galleries: one for the headings and one for the records. This provides a sticky header while scrolling the records. Are you trying to build a gridview with sort/ filter, etc?
Very creative idea, the headings get added just like another row to the collection!
Another pattern that I've seen was to use two galleries: one for the headings and one for the records. This provides a sticky header while scrolling the records. Are you trying to build a gridview with sort/ filter, etc?
I have to admit that the two gallery approach is superior. Frankly I was just playing around with this new tool, and what fun it is!
By the way, is there a function to return the column names of a table? I have not seen one in the reference.
I know this is an old topic, but here's another hack that might help.
Create labels for the column headings above the Gallery. For each label use calculated values for the x position and the width to match the Gallery item so:
For the label width: MyGalleryItem.Width
For the label x position: MyGallery.X + MyGalleryItem.X
This will cause the label width and alignment to always match the field for which it's the heading. It's a bit of a faff, but worth it in the long run.
The other more obvious alternative if you want a pure data table is to use the 'Data Table' control, which does all this for you. However, as far as I can see this doesn't support custom layouts. e.g. in my case I needed a second row for a description that spanned multiple columns in the first row.
Hi Simon,
I tried to re-create your suggestion but could not.
I created 2 Horizontal Galleries.
How to match the Header Gallery Labels with the content in the 2nd gallery below
@LauraOnu I cant seem to get the column header position to match the below
What can I do?
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
202 | |
183 | |
69 | |
43 | |
34 |
User | Count |
---|---|
341 | |
268 | |
114 | |
66 | |
66 |