<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Aligning the header text in a DataGrid column in Flex</title>
	<atom:link href="http://blog.flexexamples.com/2008/09/16/aligning-the-header-text-in-a-datagrid-column-in-flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2008/09/16/aligning-the-header-text-in-a-datagrid-column-in-flex/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Sat, 31 Jul 2010 20:56:52 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: pandu</title>
		<link>http://blog.flexexamples.com/2008/09/16/aligning-the-header-text-in-a-datagrid-column-in-flex/comment-page-1/#comment-8110</link>
		<dc:creator>pandu</dc:creator>
		<pubDate>Thu, 15 Jul 2010 10:18:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/09/16/aligning-the-header-text-in-a-datagrid-column-in-flex/#comment-8110</guid>
		<description>how to wrap text in datagrid column while using item renderers?</description>
		<content:encoded><![CDATA[<p>how to wrap text in datagrid column while using item renderers?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hydralisc</title>
		<link>http://blog.flexexamples.com/2008/09/16/aligning-the-header-text-in-a-datagrid-column-in-flex/comment-page-1/#comment-7968</link>
		<dc:creator>hydralisc</dc:creator>
		<pubDate>Sat, 19 Jun 2010 13:04:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/09/16/aligning-the-header-text-in-a-datagrid-column-in-flex/#comment-7968</guid>
		<description>Maybe someone already has an idea how to align text vertically having wordwrap enabled?</description>
		<content:encoded><![CDATA[<p>Maybe someone already has an idea how to align text vertically having wordwrap enabled?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shmk</title>
		<link>http://blog.flexexamples.com/2008/09/16/aligning-the-header-text-in-a-datagrid-column-in-flex/comment-page-1/#comment-6608</link>
		<dc:creator>shmk</dc:creator>
		<pubDate>Tue, 15 Dec 2009 10:48:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/09/16/aligning-the-header-text-in-a-datagrid-column-in-flex/#comment-6608</guid>
		<description>Any tips for aligning vertically?</description>
		<content:encoded><![CDATA[<p>Any tips for aligning vertically?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Csaba</title>
		<link>http://blog.flexexamples.com/2008/09/16/aligning-the-header-text-in-a-datagrid-column-in-flex/comment-page-1/#comment-4936</link>
		<dc:creator>Csaba</dc:creator>
		<pubDate>Tue, 04 Aug 2009 13:07:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/09/16/aligning-the-header-text-in-a-datagrid-column-in-flex/#comment-4936</guid>
		<description>Peter I&#039;d like to ask as Sanda did above. I cannot find a way to align my DataGrid header&#039;s text vertically. Have you any hint please?

thanks</description>
		<content:encoded><![CDATA[<p>Peter I&#8217;d like to ask as Sanda did above. I cannot find a way to align my DataGrid header&#8217;s text vertically. Have you any hint please?</p>
<p>thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chary1112004</title>
		<link>http://blog.flexexamples.com/2008/09/16/aligning-the-header-text-in-a-datagrid-column-in-flex/comment-page-1/#comment-4341</link>
		<dc:creator>chary1112004</dc:creator>
		<pubDate>Sun, 21 Jun 2009 16:31:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/09/16/aligning-the-header-text-in-a-datagrid-column-in-flex/#comment-4341</guid>
		<description>Thanks much!</description>
		<content:encoded><![CDATA[<p>Thanks much!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lev</title>
		<link>http://blog.flexexamples.com/2008/09/16/aligning-the-header-text-in-a-datagrid-column-in-flex/comment-page-1/#comment-3824</link>
		<dc:creator>Lev</dc:creator>
		<pubDate>Tue, 11 Nov 2008 18:02:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/09/16/aligning-the-header-text-in-a-datagrid-column-in-flex/#comment-3824</guid>
		<description>Peter,

I would like to ask the same question as Sanda S. above: is there a way to center vertically the text of the headers.

Thanks for a great blog!

-Lev</description>
		<content:encoded><![CDATA[<p>Peter,</p>
<p>I would like to ask the same question as Sanda S. above: is there a way to center vertically the text of the headers.</p>
<p>Thanks for a great blog!</p>
<p>-Lev</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthias</title>
		<link>http://blog.flexexamples.com/2008/09/16/aligning-the-header-text-in-a-datagrid-column-in-flex/comment-page-1/#comment-3831</link>
		<dc:creator>Matthias</dc:creator>
		<pubDate>Sun, 12 Oct 2008 20:21:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/09/16/aligning-the-header-text-in-a-datagrid-column-in-flex/#comment-3831</guid>
		<description>Thanks anyway :-)</description>
		<content:encoded><![CDATA[<p>Thanks anyway :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2008/09/16/aligning-the-header-text-in-a-datagrid-column-in-flex/comment-page-1/#comment-3830</link>
		<dc:creator>peterd</dc:creator>
		<pubDate>Sun, 12 Oct 2008 14:25:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/09/16/aligning-the-header-text-in-a-datagrid-column-in-flex/#comment-3830</guid>
		<description>Matthias,

I haven&#039;t used the AdvancedDataGrid classes yet, but if it isn&#039;t working for you there may be a bug (or perhaps the syntax is just different for DataGrid and AdvancedDataGrid).
I&#039;d suggest posting on the FlexCoders mailing list and see if anybody there has tried creating an AdvancedDataGrid in ActionScript and setting column/header alignment.

Sorry,
Peter</description>
		<content:encoded><![CDATA[<p>Matthias,</p>
<p>I haven&#8217;t used the AdvancedDataGrid classes yet, but if it isn&#8217;t working for you there may be a bug (or perhaps the syntax is just different for DataGrid and AdvancedDataGrid).<br />
I&#8217;d suggest posting on the FlexCoders mailing list and see if anybody there has tried creating an AdvancedDataGrid in ActionScript and setting column/header alignment.</p>
<p>Sorry,<br />
Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthias</title>
		<link>http://blog.flexexamples.com/2008/09/16/aligning-the-header-text-in-a-datagrid-column-in-flex/comment-page-1/#comment-3825</link>
		<dc:creator>Matthias</dc:creator>
		<pubDate>Sun, 12 Oct 2008 12:27:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/09/16/aligning-the-header-text-in-a-datagrid-column-in-flex/#comment-3825</guid>
		<description>Thanks Peter.

the problem is twofold:

I&#039;m using the AdvancedDataGrid and AdvancedDateGridColumn classes

I create the entire advanced datagrid in actionscript and the column number varies. So I can&#039;t use any MXML. It also can be that the alignment of the header differs from the alignment of the column data.

Whereas I&#039;m able to set the styles attributes for the column data in action script, I have difficulties doing it for the headers.

I followed your actionscript sample and I can&#039;t even get this to work with the AdvancedDataGrid classes. Your actionscript sample above would only change the first column header and not both.

With my code the whole thing doesn&#039;t work. Of course my use of the AdvancedDataGrid is somewhat more complex. E.g. I use different custom renderers for each column.

Could it be that there are some issues with the AdvancedDataGrid classes?</description>
		<content:encoded><![CDATA[<p>Thanks Peter.</p>
<p>the problem is twofold:</p>
<p>I&#8217;m using the AdvancedDataGrid and AdvancedDateGridColumn classes</p>
<p>I create the entire advanced datagrid in actionscript and the column number varies. So I can&#8217;t use any MXML. It also can be that the alignment of the header differs from the alignment of the column data.</p>
<p>Whereas I&#8217;m able to set the styles attributes for the column data in action script, I have difficulties doing it for the headers.</p>
<p>I followed your actionscript sample and I can&#8217;t even get this to work with the AdvancedDataGrid classes. Your actionscript sample above would only change the first column header and not both.</p>
<p>With my code the whole thing doesn&#8217;t work. Of course my use of the AdvancedDataGrid is somewhat more complex. E.g. I use different custom renderers for each column.</p>
<p>Could it be that there are some issues with the AdvancedDataGrid classes?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2008/09/16/aligning-the-header-text-in-a-datagrid-column-in-flex/comment-page-1/#comment-3829</link>
		<dc:creator>peterd</dc:creator>
		<pubDate>Sat, 11 Oct 2008 14:53:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/09/16/aligning-the-header-text-in-a-datagrid-column-in-flex/#comment-3829</guid>
		<description>Also, if you want to align/style the header separately from the column contents, you can set the &lt;code&gt;headerStyleName&lt;/code&gt; style:
&lt;pre class=&quot;code&quot;&gt;
&lt;strong style=&quot;color:red;&quot;&gt;&lt;mx:Style&gt;
    .centerAligned {
        textAlign: center;
        color: red;
    }
&lt;/mx:Style&gt;&lt;/strong&gt;

&lt;mx:DataGrid id=&quot;dataGrid&quot;
        dataProvider=&quot;{dp.product}&quot;
        rowCount=&quot;5&quot;
        verticalScrollPolicy=&quot;on&quot;
        width=&quot;300&quot;&gt;
    &lt;mx:columns&gt;
        &lt;mx:DataGridColumn id=&quot;dataGridColumn1&quot;
                dataField=&quot;@name&quot;
                headerText=&quot;This is a column with a long title:&quot;
                headerWordWrap=&quot;true&quot;
                textAlign=&quot;left&quot;
                minWidth=&quot;80&quot; /&gt;
        &lt;mx:DataGridColumn id=&quot;dataGridColumn2&quot;
                dataField=&quot;@price&quot;
                headerText=&quot;Price:&quot;
                headerWordWrap=&quot;false&quot;
                &lt;strong style=&quot;color:red;&quot;&gt;headerStyleName=&quot;centerAligned&quot;
                textAlign=&quot;right&quot;&lt;/strong&gt;
                minWidth=&quot;20&quot; /&gt;
    &lt;/mx:columns&gt;
&lt;/mx:DataGrid&gt;
&lt;/pre&gt;

Peter</description>
		<content:encoded><![CDATA[<p>Also, if you want to align/style the header separately from the column contents, you can set the <code>headerStyleName</code> style:</p>
<pre class="code">
<strong style="color:red;">&lt;mx:Style&gt;
    .centerAligned {
        textAlign: center;
        color: red;
    }
&lt;/mx:Style&gt;</strong>

&lt;mx:DataGrid id=&quot;dataGrid&quot;
        dataProvider=&quot;{dp.product}&quot;
        rowCount=&quot;5&quot;
        verticalScrollPolicy=&quot;on&quot;
        width=&quot;300&quot;&gt;
    &lt;mx:columns&gt;
        &lt;mx:DataGridColumn id=&quot;dataGridColumn1&quot;
                dataField=&quot;@name&quot;
                headerText=&quot;This is a column with a long title:&quot;
                headerWordWrap=&quot;true&quot;
                textAlign=&quot;left&quot;
                minWidth=&quot;80&quot; /&gt;
        &lt;mx:DataGridColumn id=&quot;dataGridColumn2&quot;
                dataField=&quot;@price&quot;
                headerText=&quot;Price:&quot;
                headerWordWrap=&quot;false&quot;
                <strong style="color:red;">headerStyleName=&quot;centerAligned&quot;
                textAlign=&quot;right&quot;</strong>
                minWidth=&quot;20&quot; /&gt;
    &lt;/mx:columns&gt;
&lt;/mx:DataGrid&gt;
</pre>
<p>Peter</p>
]]></content:encoded>
	</item>
</channel>
</rss>
