Good morning
How do I right align a column in the Data Table.
Your help will be much appreciated
JF
Hi JF,
Right-aligning a column in the Data Table component of Power Apps is not currently supported. The default alignment for all data, including numbers, is left-aligned, and there is no built-in option to change this for individual columns.
If aligning text or numbers is critical for your design, a possible workaround is to use a Gallery. With a Gallery, you can fully customize the alignment of individual columns or fields. Here’s how you can do it:
1. Insert a Vertical Gallery
• Go to Insert > Gallery > Vertical Gallery and connect it to your data source.
2. Add Labels for Each Column
• Inside the Gallery, add a Text Label for each column and bind it to the respective data field using ThisItem.(ColumnName).
3. Set Text Alignment
• Select the Label, go to the Properties panel, and set the Text Align property to Right.
While this approach takes more effort compared to using a Data Table, it gives you the flexibility to fully customize your table layout.
Exelent alternative, but too much trouble to go to for my group where "does it work?" is pretty much the only quality assureance expected. LOL
Thank you for sharing your solution.
Hi @Anonymous ,
Could you please share a bit more about your scenario?
Do you want to right align a column in a Data Table control?
If you want to right align a column in a Data Table control, I afraid that there is no way to achieve your needs in PowerApps currently.
Currently, there is no Align property supported within Data Table control to change the align attribute of a column. If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:
https://powerusers.microsoft.com/t5/Power-Apps-Ideas/idb-p/PowerAppsIdeas
As an alternative solution, you could consider configure a Gallery as a Tabular GRID. Bind your Gallery to a Table data source, then within the Gallery, add several Text Input boxes as below:
Set the Default property of the Text Input box to following formula:
ThisItem.ColumnName // use this formula to reference column value from your Table data source
After that, you could set the Align property of the Text Input box to following:
Align.Right
to display the value in right align within the Text Input box.
Best regards,
I believe you can add following style of cell to make it work:
text-align: right;
something like
<table>
<tr>
<td style="text-align: right">Content</td>
</tr>
</table>
WarrenBelz
146,658
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional