# Change Alignment of DataGrid Column

**URL:** <https://forum.kirupa.com/t/change-alignment-of-datagrid-column/331898>\
**Category:** flash\
**Created:** [November 20, 2013, 9:55am UTC](https://forum.kirupa.com/t/change-alignment-of-datagrid-column/331898 "2013-11-20T09:55:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![geHuC](https://avatars.discourse-cdn.com/v4/letter/g/7feea3/32.png) [@geHuC](https://forum.kirupa.com/u/geHuC)\
**Post date:** [November 20, 2013, 9:55am UTC](https://forum.kirupa.com/t/change-alignment-of-datagrid-column/331898/1 "2013-11-20T09:55:51Z")

</div>

I’ve been splitting my hairs for the last few hours searching how to do it (the adobe reference documents are abysmal). When using mxml it just adding

```auto
<mx:DataGridColumn textAlign="right" />

```

and you’re done. In pure AS3 I can’t freaking figure it out. The only thing I found remotely useful is to write a custom cellRenderer class just to align my text to the right :x  
Is there a simpler way to do it? Mind you, some columns need to be different alignment, so I can’t just slap a setRendererStyle on the whole grid.
