<?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: Displaying XML data in a DataGrid</title>
	<atom:link href="http://blog.flexexamples.com/2007/07/26/displaying-xml-data-in-a-datagrid/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2007/07/26/displaying-xml-data-in-a-datagrid/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Fri, 19 Mar 2010 20:35:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: RandiR</title>
		<link>http://blog.flexexamples.com/2007/07/26/displaying-xml-data-in-a-datagrid/comment-page-1/#comment-7098</link>
		<dc:creator>RandiR</dc:creator>
		<pubDate>Wed, 24 Feb 2010 15:42:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/07/26/displaying-xml-data-in-a-datagrid/#comment-7098</guid>
		<description>Hi. Thanks for the tut. Can you please show more  examples of passing data to/from flex ? I have several scripts in biterscripting that I use to grab and parse web documents. I want to pass the parsed elements to flex. Thanks.</description>
		<content:encoded><![CDATA[<p>Hi. Thanks for the tut. Can you please show more  examples of passing data to/from flex ? I have several scripts in biterscripting that I use to grab and parse web documents. I want to pass the parsed elements to flex. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mutiu</title>
		<link>http://blog.flexexamples.com/2007/07/26/displaying-xml-data-in-a-datagrid/comment-page-1/#comment-7046</link>
		<dc:creator>mutiu</dc:creator>
		<pubDate>Thu, 18 Feb 2010 10:39:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/07/26/displaying-xml-data-in-a-datagrid/#comment-7046</guid>
		<description>Hi... Great example... I would like to do the same thing loading a xml from another domain...

I have tried with a crossdomain.xml file but I still cannot make it work.

Any ideas?

than you</description>
		<content:encoded><![CDATA[<p>Hi&#8230; Great example&#8230; I would like to do the same thing loading a xml from another domain&#8230;</p>
<p>I have tried with a crossdomain.xml file but I still cannot make it work.</p>
<p>Any ideas?</p>
<p>than you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://blog.flexexamples.com/2007/07/26/displaying-xml-data-in-a-datagrid/comment-page-1/#comment-6763</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Wed, 13 Jan 2010 06:41:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/07/26/displaying-xml-data-in-a-datagrid/#comment-6763</guid>
		<description>i want to create array of objects for data grid control n flex 3.. can u help me..</description>
		<content:encoded><![CDATA[<p>i want to create array of objects for data grid control n flex 3.. can u help me..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Atul Yadav</title>
		<link>http://blog.flexexamples.com/2007/07/26/displaying-xml-data-in-a-datagrid/comment-page-1/#comment-6639</link>
		<dc:creator>Atul Yadav</dc:creator>
		<pubDate>Sat, 19 Dec 2009 12:32:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/07/26/displaying-xml-data-in-a-datagrid/#comment-6639</guid>
		<description>Hi..
To Khow more about Flex go to below link........
techy.limewebs.com</description>
		<content:encoded><![CDATA[<p>Hi..<br />
To Khow more about Flex go to below link&#8230;&#8230;..<br />
techy.limewebs.com</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Atul Yadav</title>
		<link>http://blog.flexexamples.com/2007/07/26/displaying-xml-data-in-a-datagrid/comment-page-1/#comment-6638</link>
		<dc:creator>Atul Yadav</dc:creator>
		<pubDate>Sat, 19 Dec 2009 12:29:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/07/26/displaying-xml-data-in-a-datagrid/#comment-6638</guid>
		<description>Hi...
how we pass data from child popup to parent application.
Thnax</description>
		<content:encoded><![CDATA[<p>Hi&#8230;<br />
how we pass data from child popup to parent application.<br />
Thnax</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2007/07/26/displaying-xml-data-in-a-datagrid/comment-page-1/#comment-5917</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Sat, 03 Oct 2009 14:54:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/07/26/displaying-xml-data-in-a-datagrid/#comment-5917</guid>
		<description>@Kerstin,

The following example uses an XML data provider but maintains the correct number of decimal places (but I&#039;m using the Flex 3.4 SDK, maybe something was different in earlier builds, or maybe you&#039;re loading an external XML file):
&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:XMLList id=&quot;xmlDP&quot; xmlns=&quot;&quot;&gt;
        &lt;item&gt;
            &lt;id&gt;123456&lt;/id&gt;
            &lt;name&gt;My Artikel&lt;/name&gt;
            &lt;money&gt;10.00&lt;/money&gt;
        &lt;/item&gt;
        &lt;item&gt;
            &lt;id&gt;123457&lt;/id&gt;
            &lt;name&gt;My Artikel2&lt;/name&gt;
            &lt;money&gt;1234.00&lt;/money&gt;
        &lt;/item&gt;
    &lt;/mx:XMLList&gt;

    &lt;mx:DataGrid id=&quot;dGrid&quot; dataProvider=&quot;{xmlDP}&quot;&gt;
        &lt;mx:columns&gt;
            &lt;mx:DataGridColumn dataField=&quot;id&quot; /&gt;
            &lt;mx:DataGridColumn dataField=&quot;name&quot; /&gt;
            &lt;mx:DataGridColumn dataField=&quot;money&quot; /&gt;
        &lt;/mx:columns&gt;
    &lt;/mx:DataGrid&gt;

    &lt;mx:Label id=&quot;sdkVer&quot; selectable=&quot;true&quot; initialize=&quot;sdkVer.text = mx_internal::VERSION;&quot; /&gt;
    
&lt;/mx:Application&gt;
&lt;/pre&gt;

But back to the question at hand... If you want to format a number to have two decimal places, you can use the Number class&#039;s &lt;code&gt;toFixed()&lt;/code&gt; method to format to &lt;em&gt;X&lt;/em&gt; number of decimal places, as seen in the following example:
&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:Script&gt;
        &lt;![CDATA[
            import mx.controls.dataGridClasses.DataGridColumn;

            private function money_labelFunc(item:Object, col:DataGridColumn):String {
                return parseFloat(item.money.text()).toFixed(2);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:XMLList id=&quot;xmlDP&quot; xmlns=&quot;&quot;&gt;
        &lt;item&gt;
            &lt;id&gt;123456&lt;/id&gt;
            &lt;name&gt;My Artikel&lt;/name&gt;
            &lt;money&gt;10.00&lt;/money&gt;
        &lt;/item&gt;
        &lt;item&gt;
            &lt;id&gt;123457&lt;/id&gt;
            &lt;name&gt;My Artikel2&lt;/name&gt;
            &lt;money&gt;1234.00&lt;/money&gt;
        &lt;/item&gt;
    &lt;/mx:XMLList&gt;

    &lt;mx:DataGrid id=&quot;dGrid&quot; dataProvider=&quot;{xmlDP}&quot;&gt;
        &lt;mx:columns&gt;
            &lt;mx:DataGridColumn dataField=&quot;id&quot; /&gt;
            &lt;mx:DataGridColumn dataField=&quot;name&quot; /&gt;
            &lt;mx:DataGridColumn dataField=&quot;money&quot; labelFunction=&quot;money_labelFunc&quot; /&gt;
        &lt;/mx:columns&gt;
    &lt;/mx:DataGrid&gt;

    &lt;mx:Label id=&quot;sdkVer&quot; selectable=&quot;true&quot; initialize=&quot;sdkVer.text = mx_internal::VERSION;&quot; /&gt;

&lt;/mx:Application&gt;
&lt;/pre&gt;

Furthermore, if you wanted to format the money column with thousand separators and/or dollar signs, you could use a NumberFormatter or CurrencyFormatter, as seen in the following example:
&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:Script&gt;
        &lt;![CDATA[
            import mx.controls.dataGridClasses.DataGridColumn;

            private function money_labelFunc(item:Object, col:DataGridColumn):String {
                // return numFormatter.format(item.money.text());
                return currFormatter.format(item.money.text());
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:NumberFormatter id=&quot;numFormatter&quot; precision=&quot;2&quot; useThousandsSeparator=&quot;true&quot; /&gt;
    &lt;mx:CurrencyFormatter id=&quot;currFormatter&quot; precision=&quot;2&quot; useThousandsSeparator=&quot;true&quot; /&gt;

    &lt;mx:XMLList id=&quot;xmlDP&quot; xmlns=&quot;&quot;&gt;
        &lt;item&gt;
            &lt;id&gt;123456&lt;/id&gt;
            &lt;name&gt;My Artikel&lt;/name&gt;
            &lt;money&gt;10.00&lt;/money&gt;
        &lt;/item&gt;
        &lt;item&gt;
            &lt;id&gt;123457&lt;/id&gt;
            &lt;name&gt;My Artikel2&lt;/name&gt;
            &lt;money&gt;1234.00&lt;/money&gt;
        &lt;/item&gt;
    &lt;/mx:XMLList&gt;

    &lt;mx:DataGrid id=&quot;dGrid&quot; dataProvider=&quot;{xmlDP}&quot;&gt;
        &lt;mx:columns&gt;
            &lt;mx:DataGridColumn dataField=&quot;id&quot; /&gt;
            &lt;mx:DataGridColumn dataField=&quot;name&quot; /&gt;
            &lt;mx:DataGridColumn dataField=&quot;money&quot; labelFunction=&quot;money_labelFunc&quot; /&gt;
        &lt;/mx:columns&gt;
    &lt;/mx:DataGrid&gt;

    &lt;mx:Label id=&quot;sdkVer&quot; selectable=&quot;true&quot; initialize=&quot;sdkVer.text = mx_internal::VERSION;&quot; /&gt;

&lt;/mx:Application&gt;
&lt;/pre&gt;

Hope that helps,
Peter</description>
		<content:encoded><![CDATA[<p>@Kerstin,</p>
<p>The following example uses an XML data provider but maintains the correct number of decimal places (but I&#8217;m using the Flex 3.4 SDK, maybe something was different in earlier builds, or maybe you&#8217;re loading an external XML file):</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:XMLList</span> id=<span style="color: #ff0000;">&quot;xmlDP&quot;</span> xmlns=<span style="color: #ff0000;">&quot;&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;">&lt;item<span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;">&lt;id<span style="color: #7400FF;">&gt;</span></span>123456<span style="color: #000000;">&lt;/id<span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;">&lt;name<span style="color: #7400FF;">&gt;</span></span>My Artikel<span style="color: #000000;">&lt;/name<span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;">&lt;money<span style="color: #7400FF;">&gt;</span></span>10.00<span style="color: #000000;">&lt;/money<span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;">&lt;/item<span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;">&lt;item<span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;">&lt;id<span style="color: #7400FF;">&gt;</span></span>123457<span style="color: #000000;">&lt;/id<span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;">&lt;name<span style="color: #7400FF;">&gt;</span></span>My Artikel2<span style="color: #000000;">&lt;/name<span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;">&lt;money<span style="color: #7400FF;">&gt;</span></span>1234.00<span style="color: #000000;">&lt;/money<span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;">&lt;/item<span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:XMLList</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:DataGrid</span> id=<span style="color: #ff0000;">&quot;dGrid&quot;</span> dataProvider=<span style="color: #ff0000;">&quot;{xmlDP}&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:DataGridColumn</span> dataField=<span style="color: #ff0000;">&quot;id&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;name&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;money&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:DataGrid</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Label</span> id=<span style="color: #ff0000;">&quot;sdkVer&quot;</span> selectable=<span style="color: #ff0000;">&quot;true&quot;</span> initialize=<span style="color: #ff0000;">&quot;sdkVer.text = mx_internal::VERSION;&quot;</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>But back to the question at hand&#8230; If you want to format a number to have two decimal places, you can use the Number class&#8217;s <code>toFixed()</code> method to format to <em>X</em> number of decimal places, as seen in the following example:</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: #339933;">&lt;mx:Script&gt;</span>
<span style="color: #339933;">        &lt;![CDATA[</span>
<span style="color: #339933;">            import mx.controls.dataGridClasses.DataGridColumn;</span>
&nbsp;
<span style="color: #339933;">            private function money_labelFunc(item:Object, col:DataGridColumn):String {</span>
<span style="color: #339933;">                return parseFloat(item.money.text()).toFixed(2);</span>
<span style="color: #339933;">            }</span>
<span style="color: #339933;">        ]]&gt;</span>
<span style="color: #339933;">    &lt;/mx:Script&gt;</span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:XMLList</span> id=<span style="color: #ff0000;">&quot;xmlDP&quot;</span> xmlns=<span style="color: #ff0000;">&quot;&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;">&lt;item<span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;">&lt;id<span style="color: #7400FF;">&gt;</span></span>123456<span style="color: #000000;">&lt;/id<span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;">&lt;name<span style="color: #7400FF;">&gt;</span></span>My Artikel<span style="color: #000000;">&lt;/name<span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;">&lt;money<span style="color: #7400FF;">&gt;</span></span>10.00<span style="color: #000000;">&lt;/money<span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;">&lt;/item<span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;">&lt;item<span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;">&lt;id<span style="color: #7400FF;">&gt;</span></span>123457<span style="color: #000000;">&lt;/id<span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;">&lt;name<span style="color: #7400FF;">&gt;</span></span>My Artikel2<span style="color: #000000;">&lt;/name<span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;">&lt;money<span style="color: #7400FF;">&gt;</span></span>1234.00<span style="color: #000000;">&lt;/money<span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;">&lt;/item<span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:XMLList</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:DataGrid</span> id=<span style="color: #ff0000;">&quot;dGrid&quot;</span> dataProvider=<span style="color: #ff0000;">&quot;{xmlDP}&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:DataGridColumn</span> dataField=<span style="color: #ff0000;">&quot;id&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;name&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;money&quot;</span> labelFunction=<span style="color: #ff0000;">&quot;money_labelFunc&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:DataGrid</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Label</span> id=<span style="color: #ff0000;">&quot;sdkVer&quot;</span> selectable=<span style="color: #ff0000;">&quot;true&quot;</span> initialize=<span style="color: #ff0000;">&quot;sdkVer.text = mx_internal::VERSION;&quot;</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>Furthermore, if you wanted to format the money column with thousand separators and/or dollar signs, you could use a NumberFormatter or CurrencyFormatter, as seen in the following example:</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: #339933;">&lt;mx:Script&gt;</span>
<span style="color: #339933;">        &lt;![CDATA[</span>
<span style="color: #339933;">            import mx.controls.dataGridClasses.DataGridColumn;</span>
&nbsp;
<span style="color: #339933;">            private function money_labelFunc(item:Object, col:DataGridColumn):String {</span>
<span style="color: #339933;">                // return numFormatter.format(item.money.text());</span>
<span style="color: #339933;">                return currFormatter.format(item.money.text());</span>
<span style="color: #339933;">            }</span>
<span style="color: #339933;">        ]]&gt;</span>
<span style="color: #339933;">    &lt;/mx:Script&gt;</span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:NumberFormatter</span> id=<span style="color: #ff0000;">&quot;numFormatter&quot;</span> precision=<span style="color: #ff0000;">&quot;2&quot;</span> useThousandsSeparator=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:CurrencyFormatter</span> id=<span style="color: #ff0000;">&quot;currFormatter&quot;</span> precision=<span style="color: #ff0000;">&quot;2&quot;</span> useThousandsSeparator=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:XMLList</span> id=<span style="color: #ff0000;">&quot;xmlDP&quot;</span> xmlns=<span style="color: #ff0000;">&quot;&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;">&lt;item<span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;">&lt;id<span style="color: #7400FF;">&gt;</span></span>123456<span style="color: #000000;">&lt;/id<span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;">&lt;name<span style="color: #7400FF;">&gt;</span></span>My Artikel<span style="color: #000000;">&lt;/name<span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;">&lt;money<span style="color: #7400FF;">&gt;</span></span>10.00<span style="color: #000000;">&lt;/money<span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;">&lt;/item<span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;">&lt;item<span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;">&lt;id<span style="color: #7400FF;">&gt;</span></span>123457<span style="color: #000000;">&lt;/id<span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;">&lt;name<span style="color: #7400FF;">&gt;</span></span>My Artikel2<span style="color: #000000;">&lt;/name<span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;">&lt;money<span style="color: #7400FF;">&gt;</span></span>1234.00<span style="color: #000000;">&lt;/money<span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;">&lt;/item<span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:XMLList</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:DataGrid</span> id=<span style="color: #ff0000;">&quot;dGrid&quot;</span> dataProvider=<span style="color: #ff0000;">&quot;{xmlDP}&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:DataGridColumn</span> dataField=<span style="color: #ff0000;">&quot;id&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;name&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;money&quot;</span> labelFunction=<span style="color: #ff0000;">&quot;money_labelFunc&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:DataGrid</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Label</span> id=<span style="color: #ff0000;">&quot;sdkVer&quot;</span> selectable=<span style="color: #ff0000;">&quot;true&quot;</span> initialize=<span style="color: #ff0000;">&quot;sdkVer.text = mx_internal::VERSION;&quot;</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>Hope that helps,<br />
Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kerstin</title>
		<link>http://blog.flexexamples.com/2007/07/26/displaying-xml-data-in-a-datagrid/comment-page-1/#comment-5915</link>
		<dc:creator>Kerstin</dc:creator>
		<pubDate>Sat, 03 Oct 2009 08:25:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/07/26/displaying-xml-data-in-a-datagrid/#comment-5915</guid>
		<description>OK!
&lt; money &gt; 10.00&lt; /money &gt;</description>
		<content:encoded><![CDATA[<p>OK!<br />
&lt; money &gt; 10.00&lt; /money &gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kerstin</title>
		<link>http://blog.flexexamples.com/2007/07/26/displaying-xml-data-in-a-datagrid/comment-page-1/#comment-5914</link>
		<dc:creator>Kerstin</dc:creator>
		<pubDate>Sat, 03 Oct 2009 08:23:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/07/26/displaying-xml-data-in-a-datagrid/#comment-5914</guid>
		<description>part of the XML:
&lt;code&gt;

       123456
       My Artikel
       10.00


&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>part of the XML:<br />
<code></p>
<p>       123456<br />
       My Artikel<br />
       10.00</p>
<p></code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kerstin</title>
		<link>http://blog.flexexamples.com/2007/07/26/displaying-xml-data-in-a-datagrid/comment-page-1/#comment-5912</link>
		<dc:creator>Kerstin</dc:creator>
		<pubDate>Sat, 03 Oct 2009 08:21:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/07/26/displaying-xml-data-in-a-datagrid/#comment-5912</guid>
		<description>Hello,

With my XML I get numeric values, money.  The money value comes always thith two decimal points.

        123456
       My Artikel
       10.00
   
So I want to see two decimal points at all times, even when they would be zero (eg. 1,234.00)

But in the Datagrid only displayd 10  (without .00)

How can I change this?

Thank you,
Kersitn.</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>With my XML I get numeric values, money.  The money value comes always thith two decimal points.</p>
<p>        123456<br />
       My Artikel<br />
       10.00</p>
<p>So I want to see two decimal points at all times, even when they would be zero (eg. 1,234.00)</p>
<p>But in the Datagrid only displayd 10  (without .00)</p>
<p>How can I change this?</p>
<p>Thank you,<br />
Kersitn.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2007/07/26/displaying-xml-data-in-a-datagrid/comment-page-1/#comment-4791</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Tue, 28 Jul 2009 13:45:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/07/26/displaying-xml-data-in-a-datagrid/#comment-4791</guid>
		<description>pavithra,

You need to change your &lt; chars to &lt; and your &gt; to &gt; to get the raw XML/MXML code to appear on the site.

Sorry,
Peter</description>
		<content:encoded><![CDATA[<p>pavithra,</p>
<p>You need to change your &lt; chars to &amp;lt; and your &gt; to &amp;gt; to get the raw XML/MXML code to appear on the site.</p>
<p>Sorry,<br />
Peter</p>
]]></content:encoded>
	</item>
</channel>
</rss>
