<?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: Toggling sortable columns in a Flex DataGrid control</title>
	<atom:link href="http://blog.flexexamples.com/2007/08/31/toggling-sortable-columns-in-a-flex-datagrid-control/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2007/08/31/toggling-sortable-columns-in-a-flex-datagrid-control/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Sat, 11 Feb 2012 11:51:51 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2007/08/31/toggling-sortable-columns-in-a-flex-datagrid-control/comment-page-1/#comment-6475</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Fri, 27 Nov 2009 02:03:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/31/toggling-sortable-columns-in-a-flex-datagrid-control/#comment-6475</guid>
		<description>@raghava,

I&#039;m not sure what you&#039;re seeing, but I only get the sort arrow if the Boolean &lt;code&gt;sortable&lt;/code&gt; property to true. Are you changing the &lt;code&gt;sortable&lt;/code&gt; or &lt;code&gt;sortableColumns&lt;/code&gt; property at runtime?
&lt;pre lang=&quot;mxml&quot;&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;&gt;
    
    &lt;mx:DataGrid&gt;
        &lt;mx:columns&gt;
            &lt;mx:DataGridColumn dataField=&quot;c1&quot; headerText=&quot;sortable=true&quot; sortable=&quot;true&quot; width=&quot;150&quot; /&gt;
            &lt;mx:DataGridColumn dataField=&quot;c2&quot; headerText=&quot;sortable=false&quot; sortable=&quot;false&quot; width=&quot;150&quot; /&gt;
        &lt;/mx:columns&gt;
        &lt;mx:dataProvider&gt;
            &lt;mx:ArrayCollection&gt;
                &lt;mx:Object c1=&quot;1.One&quot; c2=&quot;1.Two&quot; /&gt;
                &lt;mx:Object c1=&quot;2.One&quot; c2=&quot;2.Two&quot; /&gt;
                &lt;mx:Object c1=&quot;3.One&quot; c2=&quot;3.Two&quot; /&gt;
                &lt;mx:Object c1=&quot;4.One&quot; c2=&quot;4.Two&quot; /&gt;
                &lt;mx:Object c1=&quot;5.One&quot; c2=&quot;5.Two&quot; /&gt;
                &lt;mx:Object c1=&quot;6.One&quot; c2=&quot;6.Two&quot; /&gt;
                &lt;mx:Object c1=&quot;7.One&quot; c2=&quot;7.Two&quot; /&gt;
                &lt;mx:Object c1=&quot;8.One&quot; c2=&quot;8.Two&quot; /&gt;
                &lt;mx:Object c1=&quot;9.One&quot; c2=&quot;9.Two&quot; /&gt;
            &lt;/mx:ArrayCollection&gt;
        &lt;/mx:dataProvider&gt;
    &lt;/mx:DataGrid&gt;
    
&lt;/mx:Application&gt;
&lt;/pre&gt;

Peter</description>
		<content:encoded><![CDATA[<p>@raghava,</p>
<p>I&#8217;m not sure what you&#8217;re seeing, but I only get the sort arrow if the Boolean <code>sortable</code> property to true. Are you changing the <code>sortable</code> or <code>sortableColumns</code> property at runtime?</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Application</span> xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:DataGrid</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:columns</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:DataGridColumn</span> dataField=<span style="color: #ff0000;">&quot;c1&quot;</span> headerText=<span style="color: #ff0000;">&quot;sortable=true&quot;</span> sortable=<span style="color: #ff0000;">&quot;true&quot;</span> width=<span style="color: #ff0000;">&quot;150&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:DataGridColumn</span> dataField=<span style="color: #ff0000;">&quot;c2&quot;</span> headerText=<span style="color: #ff0000;">&quot;sortable=false&quot;</span> sortable=<span style="color: #ff0000;">&quot;false&quot;</span> width=<span style="color: #ff0000;">&quot;150&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:columns</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:dataProvider</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:ArrayCollection</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Object</span> c1=<span style="color: #ff0000;">&quot;1.One&quot;</span> c2=<span style="color: #ff0000;">&quot;1.Two&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Object</span> c1=<span style="color: #ff0000;">&quot;2.One&quot;</span> c2=<span style="color: #ff0000;">&quot;2.Two&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Object</span> c1=<span style="color: #ff0000;">&quot;3.One&quot;</span> c2=<span style="color: #ff0000;">&quot;3.Two&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Object</span> c1=<span style="color: #ff0000;">&quot;4.One&quot;</span> c2=<span style="color: #ff0000;">&quot;4.Two&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Object</span> c1=<span style="color: #ff0000;">&quot;5.One&quot;</span> c2=<span style="color: #ff0000;">&quot;5.Two&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Object</span> c1=<span style="color: #ff0000;">&quot;6.One&quot;</span> c2=<span style="color: #ff0000;">&quot;6.Two&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Object</span> c1=<span style="color: #ff0000;">&quot;7.One&quot;</span> c2=<span style="color: #ff0000;">&quot;7.Two&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Object</span> c1=<span style="color: #ff0000;">&quot;8.One&quot;</span> c2=<span style="color: #ff0000;">&quot;8.Two&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Object</span> c1=<span style="color: #ff0000;">&quot;9.One&quot;</span> c2=<span style="color: #ff0000;">&quot;9.Two&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:ArrayCollection</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:dataProvider</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:DataGrid</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: raghava</title>
		<link>http://blog.flexexamples.com/2007/08/31/toggling-sortable-columns-in-a-flex-datagrid-control/comment-page-1/#comment-6465</link>
		<dc:creator>raghava</dc:creator>
		<pubDate>Thu, 26 Nov 2009 11:10:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/31/toggling-sortable-columns-in-a-flex-datagrid-control/#comment-6465</guid>
		<description>Hi Peter,

I want to have some more functionality here. If  we make the srtableColumns false, still the sortIcon appears in the datagrid. Can please tell me is it possible for me to this.

regards
Raghava</description>
		<content:encoded><![CDATA[<p>Hi Peter,</p>
<p>I want to have some more functionality here. If  we make the srtableColumns false, still the sortIcon appears in the datagrid. Can please tell me is it possible for me to this.</p>
<p>regards<br />
Raghava</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://blog.flexexamples.com/2007/08/31/toggling-sortable-columns-in-a-flex-datagrid-control/comment-page-1/#comment-912</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Sat, 28 Mar 2009 05:19:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/31/toggling-sortable-columns-in-a-flex-datagrid-control/#comment-912</guid>
		<description>how to sort  the data in the datagrid wnen an xml was passed as swap the header coluimn using the selected item in the combobox</description>
		<content:encoded><![CDATA[<p>how to sort  the data in the datagrid wnen an xml was passed as swap the header coluimn using the selected item in the combobox</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kelvin</title>
		<link>http://blog.flexexamples.com/2007/08/31/toggling-sortable-columns-in-a-flex-datagrid-control/comment-page-1/#comment-911</link>
		<dc:creator>Kelvin</dc:creator>
		<pubDate>Wed, 07 May 2008 14:04:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/31/toggling-sortable-columns-in-a-flex-datagrid-control/#comment-911</guid>
		<description>Hi All.
Just incase, you come across this sample, you will find that Alejandro is talking the truth. For whatever reason the sortDescending property does not accurately reflect the sort order. For a good sample that works and shows the correct sorting order, take a look at http://blog.flexexamples.com/2007/08/23/determining-a-datagridcolumn-objects-current-sort-order/#more-117

It works as expected.</description>
		<content:encoded><![CDATA[<p>Hi All.<br />
Just incase, you come across this sample, you will find that Alejandro is talking the truth. For whatever reason the sortDescending property does not accurately reflect the sort order. For a good sample that works and shows the correct sorting order, take a look at <a href="http://blog.flexexamples.com/2007/08/23/determining-a-datagridcolumn-objects-current-sort-order/#more-117" rel="nofollow">http://blog.flexexamples.com/2007/08/23/determining-a-datagridcolumn-objects-current-sort-order/#more-117</a></p>
<p>It works as expected.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fenix</title>
		<link>http://blog.flexexamples.com/2007/08/31/toggling-sortable-columns-in-a-flex-datagrid-control/comment-page-1/#comment-910</link>
		<dc:creator>fenix</dc:creator>
		<pubDate>Mon, 28 Apr 2008 14:23:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/31/toggling-sortable-columns-in-a-flex-datagrid-control/#comment-910</guid>
		<description>Thanks for interesting clause</description>
		<content:encoded><![CDATA[<p>Thanks for interesting clause</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alejandro</title>
		<link>http://blog.flexexamples.com/2007/08/31/toggling-sortable-columns-in-a-flex-datagrid-control/comment-page-1/#comment-909</link>
		<dc:creator>Alejandro</dc:creator>
		<pubDate>Fri, 30 Nov 2007 13:07:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/31/toggling-sortable-columns-in-a-flex-datagrid-control/#comment-909</guid>
		<description>Hi guys, someone knows why when i start clicking the datagrid header column, i receive two events with the same order? example:

label (sortDescending:false)
label (sortDescending:false)
label (sortDescending:true)

After the 3º click, the order ascending/descending starts to work correctly.

Is it a bug?
thx in advance</description>
		<content:encoded><![CDATA[<p>Hi guys, someone knows why when i start clicking the datagrid header column, i receive two events with the same order? example:</p>
<p>label (sortDescending:false)<br />
label (sortDescending:false)<br />
label (sortDescending:true)</p>
<p>After the 3º click, the order ascending/descending starts to work correctly.</p>
<p>Is it a bug?<br />
thx in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/08/31/toggling-sortable-columns-in-a-flex-datagrid-control/comment-page-1/#comment-908</link>
		<dc:creator>peterd</dc:creator>
		<pubDate>Sun, 02 Sep 2007 17:15:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/31/toggling-sortable-columns-in-a-flex-datagrid-control/#comment-908</guid>
		<description>Alberto,

Thanks for the heads up. The code actually has the &#039;\n&#039; if you download source, but something in the HTML or WordPress template always eats my single backslashes. I doubled up the backslash so now it should appear properly above.

Peter</description>
		<content:encoded><![CDATA[<p>Alberto,</p>
<p>Thanks for the heads up. The code actually has the &#8216;\n&#8217; if you download source, but something in the HTML or WordPress template always eats my single backslashes. I doubled up the backslash so now it should appear properly above.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alberto</title>
		<link>http://blog.flexexamples.com/2007/08/31/toggling-sortable-columns-in-a-flex-datagrid-control/comment-page-1/#comment-907</link>
		<dc:creator>Alberto</dc:creator>
		<pubDate>Sun, 02 Sep 2007 10:40:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/31/toggling-sortable-columns-in-a-flex-datagrid-control/#comment-907</guid>
		<description>bit bug :)

debug.text  = column.dataField   &quot; (sortDescending:&quot;   column.sortDescending   &quot;)&quot;   &quot;n&quot;;

At end, replace &quot;n&quot;; by &quot;\n&quot;;</description>
		<content:encoded><![CDATA[<p>bit bug :)</p>
<p>debug.text  = column.dataField   &#8221; (sortDescending:&#8221;   column.sortDescending   &#8220;)&#8221;   &#8220;n&#8221;;</p>
<p>At end, replace &#8220;n&#8221;; by &#8220;\n&#8221;;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: laoyu</title>
		<link>http://blog.flexexamples.com/2007/08/31/toggling-sortable-columns-in-a-flex-datagrid-control/comment-page-1/#comment-906</link>
		<dc:creator>laoyu</dc:creator>
		<pubDate>Sat, 01 Sep 2007 15:02:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/31/toggling-sortable-columns-in-a-flex-datagrid-control/#comment-906</guid>
		<description>very good!this is very basic sample!</description>
		<content:encoded><![CDATA[<p>very good!this is very basic sample!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

