<?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: Using a Flex TextArea control as a drop-in item editor</title>
	<atom:link href="http://blog.flexexamples.com/2007/09/30/using-a-flex-textarea-control-as-a-drop-in-item-editor/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2007/09/30/using-a-flex-textarea-control-as-a-drop-in-item-editor/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Sun, 12 Feb 2012 14:19:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Nicolas</title>
		<link>http://blog.flexexamples.com/2007/09/30/using-a-flex-textarea-control-as-a-drop-in-item-editor/comment-page-1/#comment-8368</link>
		<dc:creator>Nicolas</dc:creator>
		<pubDate>Tue, 28 Sep 2010 19:18:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/30/using-a-flex-textarea-control-as-a-drop-in-item-editor/#comment-8368</guid>
		<description>Hi, 

I&#039;m trying to have a multiline component in my DataGrid, where I define the break with \n ou  in my source, xml file. 

I&#039;ve try both \n and  without succes. 

I&#039;ve try this but this is not working : 

&lt;mx:DataGridColumn headerText=&quot;{xmlLoaded.outils.columns.SI.name}&quot;
						 dataField=&quot;SI&quot;
						 visible=&quot;{xmlLoaded.outils.columns.SI.visible}&quot;
						 &gt;
	&lt;mx:itemRenderer&gt;
		&lt;fx:Component&gt;
			
			&lt;s:MXDataGridItemRenderer&gt;
				&lt;fx:Script&gt;
					&lt;![CDATA[
						import mx.events.FlexEvent;
						import flashx.textLayout.elements.TextFlow;
						
						import spark.utils.TextFlowUtil;
						private function textFlow(s:String):TextFlow
						{
							return TextFlowUtil.importFromString(s) ;
						}

					]]&gt;
				&lt;/fx:Script&gt;
				&lt;s:TextArea id=&quot;monTextArea&quot; textFlow=&quot;convert({data.SI})&quot; /&gt;
			&lt;/s:MXDataGridItemRenderer&gt;
		&lt;/fx:Component&gt;
	&lt;/mx:itemRenderer&gt;
&lt;/mx:DataGridColumn&gt;

Do you have any other idea ?

Best regards,</description>
		<content:encoded><![CDATA[<p>Hi, </p>
<p>I&#8217;m trying to have a multiline component in my DataGrid, where I define the break with \n ou  in my source, xml file. </p>
<p>I&#8217;ve try both \n and  without succes. </p>
<p>I&#8217;ve try this but this is not working : </p>
<p>&lt;mx:DataGridColumn headerText=&#8221;{xmlLoaded.outils.columns.SI.name}&#8221;<br />
						 dataField=&#8221;SI&#8221;<br />
						 visible=&#8221;{xmlLoaded.outils.columns.SI.visible}&#8221;<br />
						 &gt;<br />
	&lt;mx:itemRenderer&gt;<br />
		&lt;fx:Component&gt;</p>
<p>			&lt;s:MXDataGridItemRenderer&gt;<br />
				&lt;fx:Script&gt;<br />
					&lt;![CDATA[<br />
						import mx.events.FlexEvent;<br />
						import flashx.textLayout.elements.TextFlow;</p>
<p>						import spark.utils.TextFlowUtil;<br />
						private function textFlow(s:String):TextFlow<br />
						{<br />
							return TextFlowUtil.importFromString(s) ;<br />
						}</p>
<p>					]]&gt;<br />
				&lt;/fx:Script&gt;<br />
				&lt;s:TextArea id=&#8221;monTextArea&#8221; textFlow=&#8221;convert({data.SI})&#8221; /&gt;<br />
			&lt;/s:MXDataGridItemRenderer&gt;<br />
		&lt;/fx:Component&gt;<br />
	&lt;/mx:itemRenderer&gt;<br />
&lt;/mx:DataGridColumn&gt;</p>
<p>Do you have any other idea ?</p>
<p>Best regards,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: robert</title>
		<link>http://blog.flexexamples.com/2007/09/30/using-a-flex-textarea-control-as-a-drop-in-item-editor/comment-page-1/#comment-8331</link>
		<dc:creator>robert</dc:creator>
		<pubDate>Thu, 16 Sep 2010 12:37:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/30/using-a-flex-textarea-control-as-a-drop-in-item-editor/#comment-8331</guid>
		<description>Hi,

This is an example of a datagrid&#039;s column with an TextArea as the itemEditor, which accomodates its size while typing:

&lt;mx:DataGridColumn headerText=&quot;MyHeader&quot;
				dataField=&quot;myfield&quot; wordWrap=&quot;true&quot;
				editorUsesEnterKey=&quot;true&quot; &gt;
				&lt;mx:itemEditor&gt;
					&lt;mx:Component&gt;
						&lt;mx:TextArea wordWrap=&quot;true&quot; 
							preinitialize=&quot;preinitializeHandler(event)&quot;&gt;
							&lt;mx:Script&gt;
								&lt;![CDATA[

									private function preinitializeHandler(event : Event) : void
									{
										addEventListener(Event.CHANGE, function() : void
										{
											setActualSize(width, textHeight + 10);
										});
									}
								]]&gt;
							&lt;/mx:Script&gt;
						&lt;/mx:TextArea&gt;
					&lt;/mx:Component&gt;
				&lt;/mx:itemEditor&gt;
&lt;/mx:DataGridColumn&gt;

Regards,
Robert</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>This is an example of a datagrid&#8217;s column with an TextArea as the itemEditor, which accomodates its size while typing:</p>
<p>&lt;mx:DataGridColumn headerText=&#8221;MyHeader&#8221;<br />
				dataField=&#8221;myfield&#8221; wordWrap=&#8221;true&#8221;<br />
				editorUsesEnterKey=&#8221;true&#8221; &gt;<br />
				&lt;mx:itemEditor&gt;<br />
					&lt;mx:Component&gt;<br />
						&lt;mx:TextArea wordWrap=&#8221;true&#8221;<br />
							preinitialize=&#8221;preinitializeHandler(event)&#8221;&gt;<br />
							&lt;mx:Script&gt;<br />
								&lt;![CDATA[</p>
<p>									private function preinitializeHandler(event : Event) : void<br />
									{<br />
										addEventListener(Event.CHANGE, function() : void<br />
										{<br />
											setActualSize(width, textHeight + 10);<br />
										});<br />
									}<br />
								]]&gt;<br />
							&lt;/mx:Script&gt;<br />
						&lt;/mx:TextArea&gt;<br />
					&lt;/mx:Component&gt;<br />
				&lt;/mx:itemEditor&gt;<br />
&lt;/mx:DataGridColumn&gt;</p>
<p>Regards,<br />
Robert</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Saariko</title>
		<link>http://blog.flexexamples.com/2007/09/30/using-a-flex-textarea-control-as-a-drop-in-item-editor/comment-page-1/#comment-7846</link>
		<dc:creator>Saariko</dc:creator>
		<pubDate>Thu, 03 Jun 2010 12:34:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/30/using-a-flex-textarea-control-as-a-drop-in-item-editor/#comment-7846</guid>
		<description>hey all

is there a way to adjust the row height dynamically while typing to accommodate all the text and not just at the end of the edit?

thanx,
Saar</description>
		<content:encoded><![CDATA[<p>hey all</p>
<p>is there a way to adjust the row height dynamically while typing to accommodate all the text and not just at the end of the edit?</p>
<p>thanx,<br />
Saar</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Fisherr</title>
		<link>http://blog.flexexamples.com/2007/09/30/using-a-flex-textarea-control-as-a-drop-in-item-editor/comment-page-1/#comment-7437</link>
		<dc:creator>Alex Fisherr</dc:creator>
		<pubDate>Tue, 06 Apr 2010 09:33:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/30/using-a-flex-textarea-control-as-a-drop-in-item-editor/#comment-7437</guid>
		<description>Hi Everyone, 
                                  Is there any way that I can prevent the edited text to be stored in the list. For example, I allow editing on a list of employee names. If some one edits an item to  a name that is already on the list,  the entry should be simply discarded. The original name should keep there and an alert shown to the user that the name already exists. I tried itemEditBegin event but by then, the data has been changed.
Any help in this regards would be greatly appreciated.

Thanks</description>
		<content:encoded><![CDATA[<p>Hi Everyone,<br />
                                  Is there any way that I can prevent the edited text to be stored in the list. For example, I allow editing on a list of employee names. If some one edits an item to  a name that is already on the list,  the entry should be simply discarded. The original name should keep there and an alert shown to the user that the name already exists. I tried itemEditBegin event but by then, the data has been changed.<br />
Any help in this regards would be greatly appreciated.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JJ</title>
		<link>http://blog.flexexamples.com/2007/09/30/using-a-flex-textarea-control-as-a-drop-in-item-editor/comment-page-1/#comment-6982</link>
		<dc:creator>JJ</dc:creator>
		<pubDate>Thu, 11 Feb 2010 16:38:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/30/using-a-flex-textarea-control-as-a-drop-in-item-editor/#comment-6982</guid>
		<description>Is there a way to have the scrollbar calculate the height correctly? Currently if one row has a lot of content (try filling out one row above with a lot of content...), the scrollbar will resize to what is visible. Then if you scroll past the content the scrollbar height jumps wildly in size. Basically it bounces in height as you scroll, making this ineffective to use.</description>
		<content:encoded><![CDATA[<p>Is there a way to have the scrollbar calculate the height correctly? Currently if one row has a lot of content (try filling out one row above with a lot of content&#8230;), the scrollbar will resize to what is visible. Then if you scroll past the content the scrollbar height jumps wildly in size. Basically it bounces in height as you scroll, making this ineffective to use.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vijay Anand Mareddy</title>
		<link>http://blog.flexexamples.com/2007/09/30/using-a-flex-textarea-control-as-a-drop-in-item-editor/comment-page-1/#comment-6703</link>
		<dc:creator>Vijay Anand Mareddy</dc:creator>
		<pubDate>Wed, 30 Dec 2009 17:21:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/30/using-a-flex-textarea-control-as-a-drop-in-item-editor/#comment-6703</guid>
		<description>measure()   is  invoked when u call  invalidateSize()
http://codeofdoom.com/wordpress/2009/02/19/override-core-uicomponent-methods/</description>
		<content:encoded><![CDATA[<p>measure()   is  invoked when u call  invalidateSize()<br />
<a href="http://codeofdoom.com/wordpress/2009/02/19/override-core-uicomponent-methods/" rel="nofollow">http://codeofdoom.com/wordpress/2009/02/19/override-core-uicomponent-methods/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ids</title>
		<link>http://blog.flexexamples.com/2007/09/30/using-a-flex-textarea-control-as-a-drop-in-item-editor/comment-page-1/#comment-6301</link>
		<dc:creator>Ids</dc:creator>
		<pubDate>Mon, 09 Nov 2009 14:19:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/30/using-a-flex-textarea-control-as-a-drop-in-item-editor/#comment-6301</guid>
		<description>Do you know which event to listen to when saving the data? The itemEditEnd event seems to be called too soon, I can&#039;t find the updated data.</description>
		<content:encoded><![CDATA[<p>Do you know which event to listen to when saving the data? The itemEditEnd event seems to be called too soon, I can&#8217;t find the updated data.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Grant</title>
		<link>http://blog.flexexamples.com/2007/09/30/using-a-flex-textarea-control-as-a-drop-in-item-editor/comment-page-1/#comment-5902</link>
		<dc:creator>Grant</dc:creator>
		<pubDate>Thu, 01 Oct 2009 20:54:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/30/using-a-flex-textarea-control-as-a-drop-in-item-editor/#comment-5902</guid>
		<description>Hi, I&#039;ve tried every kind of custom renderer and editor and data setter I can think of, to no avail:

Given multi-line data in a datagrid cell, I&#039;d like the datagrid to just show the first line of text (this part is easy if you make the renderer a Label; it even  truncates with ellipses for you), but when the user clicks on the text to edit, I want the datagrid row height to expand to show all the text lines. When the user stops editing, I&#039;d like it to collapse back together.

One issue seems to be that measure() is not called by the grid unless the source data for the cell has changed.

Thanks for any help</description>
		<content:encoded><![CDATA[<p>Hi, I&#8217;ve tried every kind of custom renderer and editor and data setter I can think of, to no avail:</p>
<p>Given multi-line data in a datagrid cell, I&#8217;d like the datagrid to just show the first line of text (this part is easy if you make the renderer a Label; it even  truncates with ellipses for you), but when the user clicks on the text to edit, I want the datagrid row height to expand to show all the text lines. When the user stops editing, I&#8217;d like it to collapse back together.</p>
<p>One issue seems to be that measure() is not called by the grid unless the source data for the cell has changed.</p>
<p>Thanks for any help</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2007/09/30/using-a-flex-textarea-control-as-a-drop-in-item-editor/comment-page-1/#comment-4555</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Tue, 14 Jul 2009 08:12:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/30/using-a-flex-textarea-control-as-a-drop-in-item-editor/#comment-4555</guid>
		<description>deepti,

Something like this:
&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:ApplicationControlBar dock=&quot;true&quot;&gt;
        &lt;mx:ComboBox id=&quot;comboBox&quot;
                prompt=&quot;Please select an image...&quot;
                change=&quot;img.source = comboBox.selectedItem.imgURL;&quot;&gt;
            &lt;mx:dataProvider&gt;
                &lt;mx:Array&gt;
                    &lt;mx:Object label=&quot;Flower 1&quot;
                               imgURL=&quot;http://helpexamples.com/flash/images/image1.jpg&quot; /&gt;
                    &lt;mx:Object label=&quot;Flower 2&quot;
                               imgURL=&quot;http://helpexamples.com/flash/images/image2.jpg&quot; /&gt;
                    &lt;mx:Object label=&quot;Flower 3&quot; 
                               imgURL=&quot;http://helpexamples.com/flash/images/image3.jpg&quot; /&gt;
                    &lt;mx:Object label=&quot;Flower 4&quot;
                               imgURL=&quot;http://helpexamples.com/flash/images/image4.jpg&quot; /&gt;
                &lt;/mx:Array&gt;
            &lt;/mx:dataProvider&gt;
        &lt;/mx:ComboBox&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:Image id=&quot;img&quot; /&gt;

&lt;/mx:Application&gt;
&lt;/pre&gt;

Peter</description>
		<content:encoded><![CDATA[<p>deepti,</p>
<p>Something like this:</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:ApplicationControlBar</span> dock=<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:ComboBox</span> id=<span style="color: #ff0000;">&quot;comboBox&quot;</span></span>
<span style="color: #000000;">                prompt=<span style="color: #ff0000;">&quot;Please select an image...&quot;</span></span>
<span style="color: #000000;">                change=<span style="color: #ff0000;">&quot;img.source = comboBox.selectedItem.imgURL;&quot;</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:Array</span><span style="color: #7400FF;">&gt;</span></span>
                    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Object</span> label=<span style="color: #ff0000;">&quot;Flower 1&quot;</span></span>
<span style="color: #000000;">                               imgURL=<span style="color: #ff0000;">&quot;http://helpexamples.com/flash/images/image1.jpg&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Object</span> label=<span style="color: #ff0000;">&quot;Flower 2&quot;</span></span>
<span style="color: #000000;">                               imgURL=<span style="color: #ff0000;">&quot;http://helpexamples.com/flash/images/image2.jpg&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Object</span> label=<span style="color: #ff0000;">&quot;Flower 3&quot;</span> </span>
<span style="color: #000000;">                               imgURL=<span style="color: #ff0000;">&quot;http://helpexamples.com/flash/images/image3.jpg&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Object</span> label=<span style="color: #ff0000;">&quot;Flower 4&quot;</span></span>
<span style="color: #000000;">                               imgURL=<span style="color: #ff0000;">&quot;http://helpexamples.com/flash/images/image4.jpg&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Array</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:ComboBox</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:ApplicationControlBar</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Image</span> id=<span style="color: #ff0000;">&quot;img&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>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: deepti</title>
		<link>http://blog.flexexamples.com/2007/09/30/using-a-flex-textarea-control-as-a-drop-in-item-editor/comment-page-1/#comment-4550</link>
		<dc:creator>deepti</dc:creator>
		<pubDate>Tue, 14 Jul 2009 05:52:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/30/using-a-flex-textarea-control-as-a-drop-in-item-editor/#comment-4550</guid>
		<description>how do we connect an combo box with an image box and how to change an image in image box by selecting the content of combo box...../????????</description>
		<content:encoded><![CDATA[<p>how do we connect an combo box with an image box and how to change an image in image box by selecting the content of combo box&#8230;../????????</p>
]]></content:encoded>
	</item>
</channel>
</rss>

