<?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: Dynamically adding new columns to a DataGrid control in Flex</title>
	<atom:link href="http://blog.flexexamples.com/2008/03/04/dynamically-adding-new-columns-to-a-datagrid-control-in-flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2008/03/04/dynamically-adding-new-columns-to-a-datagrid-control-in-flex/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Sun, 12 Feb 2012 19:26:49 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Sonu</title>
		<link>http://blog.flexexamples.com/2008/03/04/dynamically-adding-new-columns-to-a-datagrid-control-in-flex/comment-page-1/#comment-8957</link>
		<dc:creator>Sonu</dc:creator>
		<pubDate>Fri, 04 Feb 2011 11:57:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/03/04/dynamically-adding-new-columns-to-a-datagrid-control-in-flex/#comment-8957</guid>
		<description>In short how I will set dataprovider for dynamic datagrid..
Thanx in advance</description>
		<content:encoded><![CDATA[<p>In short how I will set dataprovider for dynamic datagrid..<br />
Thanx in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sonu</title>
		<link>http://blog.flexexamples.com/2008/03/04/dynamically-adding-new-columns-to-a-datagrid-control-in-flex/comment-page-1/#comment-8956</link>
		<dc:creator>Sonu</dc:creator>
		<pubDate>Fri, 04 Feb 2011 11:44:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/03/04/dynamically-adding-new-columns-to-a-datagrid-control-in-flex/#comment-8956</guid>
		<description>I want to provide that arrayList into the dataprovider to datagrid...so tat all the added columns will pickup tat values and display it into datagrid.</description>
		<content:encoded><![CDATA[<p>I want to provide that arrayList into the dataprovider to datagrid&#8230;so tat all the added columns will pickup tat values and display it into datagrid.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sonu</title>
		<link>http://blog.flexexamples.com/2008/03/04/dynamically-adding-new-columns-to-a-datagrid-control-in-flex/comment-page-1/#comment-8955</link>
		<dc:creator>Sonu</dc:creator>
		<pubDate>Fri, 04 Feb 2011 11:39:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/03/04/dynamically-adding-new-columns-to-a-datagrid-control-in-flex/#comment-8955</guid>
		<description>Hey,
I am using flex datagrid and i want to add dynamic columns init at runtime..I am able to do so using above code but I am reterving data from the database from two diff tables with the help of java..and the arraylist which contains all the values from database are constant(suppose it contins 10 values),so for adding new column into datagrid tat list needs to be dynamic...can anybody help me</description>
		<content:encoded><![CDATA[<p>Hey,<br />
I am using flex datagrid and i want to add dynamic columns init at runtime..I am able to do so using above code but I am reterving data from the database from two diff tables with the help of java..and the arraylist which contains all the values from database are constant(suppose it contins 10 values),so for adding new column into datagrid tat list needs to be dynamic&#8230;can anybody help me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Deepa</title>
		<link>http://blog.flexexamples.com/2008/03/04/dynamically-adding-new-columns-to-a-datagrid-control-in-flex/comment-page-1/#comment-8947</link>
		<dc:creator>Deepa</dc:creator>
		<pubDate>Wed, 02 Feb 2011 20:44:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/03/04/dynamically-adding-new-columns-to-a-datagrid-control-in-flex/#comment-8947</guid>
		<description>Just another comment: the domainObj is an abstract name that may point to the obj instance</description>
		<content:encoded><![CDATA[<p>Just another comment: the domainObj is an abstract name that may point to the obj instance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Deepa</title>
		<link>http://blog.flexexamples.com/2008/03/04/dynamically-adding-new-columns-to-a-datagrid-control-in-flex/comment-page-1/#comment-8946</link>
		<dc:creator>Deepa</dc:creator>
		<pubDate>Wed, 02 Feb 2011 20:42:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/03/04/dynamically-adding-new-columns-to-a-datagrid-control-in-flex/#comment-8946</guid>
		<description>I got the solution for my issue. Below is the code. The only thing that I was missing was assigning datafeild and width. 

			private function constructDynamicColumnForADG():void{
				var colsArray:Array = new Array() ;
				var column:AdvancedDataGridColumn ;
				var res:Number = flash.system.Capabilities.screenResolutionX;
				for each(var domainObj: in domainObjList)
				{
					column = new AdvancedDataGridColumn() ;
					column.headerText = domainObj.name ;
					column.dataField = domainObj.name;
					column.width=res*.50;
					colsArray.push(column) ;
				}
				adg.headerWordWrap=true;
				adg.headerHeight=50;
				adg.width = res*2;
				adg.columns = colsArray ;
				adg.invalidateDisplayList();
			}


</description>
		<content:encoded><![CDATA[<p>I got the solution for my issue. Below is the code. The only thing that I was missing was assigning datafeild and width. </p>
<p>			private function constructDynamicColumnForADG():void{<br />
				var colsArray:Array = new Array() ;<br />
				var column:AdvancedDataGridColumn ;<br />
				var res:Number = flash.system.Capabilities.screenResolutionX;<br />
				for each(var domainObj: in domainObjList)<br />
				{<br />
					column = new AdvancedDataGridColumn() ;<br />
					column.headerText = domainObj.name ;<br />
					column.dataField = domainObj.name;<br />
					column.width=res*.50;<br />
					colsArray.push(column) ;<br />
				}<br />
				adg.headerWordWrap=true;<br />
				adg.headerHeight=50;<br />
				adg.width = res*2;<br />
				adg.columns = colsArray ;<br />
				adg.invalidateDisplayList();<br />
			}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Deepa</title>
		<link>http://blog.flexexamples.com/2008/03/04/dynamically-adding-new-columns-to-a-datagrid-control-in-flex/comment-page-1/#comment-8942</link>
		<dc:creator>Deepa</dc:creator>
		<pubDate>Wed, 02 Feb 2011 00:31:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/03/04/dynamically-adding-new-columns-to-a-datagrid-control-in-flex/#comment-8942</guid>
		<description>Hey Everyone,

I have a question about adding dynamic columns to Advanced Data Grid. The requirment is I need to query a table and take the row data and convert it to the columns.

			private function constructDynamicColumnForADG():void{
				var colsArray:Array = adg.columns ;
				var column:AdvancedDataGridColumn ;
				var res:Number = flash.system.Capabilities.screenResolutionX;
				//adg.dataProvider = fixSubsystemUserList;
				for each(var domainObj: in domainList)
				{
					column = new AdvancedDataGridColumn() ;
					column.headerText = domainObj.name ;
					column.width=res*.04;
					colsArray.push(column) ;
				}
				adg.columns = colsArray ;
				adg.invalidateDisplayList();
				
			}




I am able to diplay # of columns depending upon the domainList (which is populated from the database). But the issue if I am not able to difplay the column names. What do I need to do? DO I have to use Classfactory?(I not sure about the its working though)

Any help is appreciated.

Thanks,
Deepa</description>
		<content:encoded><![CDATA[<p>Hey Everyone,</p>
<p>I have a question about adding dynamic columns to Advanced Data Grid. The requirment is I need to query a table and take the row data and convert it to the columns.</p>
<p>			private function constructDynamicColumnForADG():void{<br />
				var colsArray:Array = adg.columns ;<br />
				var column:AdvancedDataGridColumn ;<br />
				var res:Number = flash.system.Capabilities.screenResolutionX;<br />
				//adg.dataProvider = fixSubsystemUserList;<br />
				for each(var domainObj: in domainList)<br />
				{<br />
					column = new AdvancedDataGridColumn() ;<br />
					column.headerText = domainObj.name ;<br />
					column.width=res*.04;<br />
					colsArray.push(column) ;<br />
				}<br />
				adg.columns = colsArray ;<br />
				adg.invalidateDisplayList();</p>
<p>			}</p>
<p>I am able to diplay # of columns depending upon the domainList (which is populated from the database). But the issue if I am not able to difplay the column names. What do I need to do? DO I have to use Classfactory?(I not sure about the its working though)</p>
<p>Any help is appreciated.</p>
<p>Thanks,<br />
Deepa</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2008/03/04/dynamically-adding-new-columns-to-a-datagrid-control-in-flex/comment-page-1/#comment-8940</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Tue, 01 Feb 2011 15:49:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/03/04/dynamically-adding-new-columns-to-a-datagrid-control-in-flex/#comment-8940</guid>
		<description>@Sabbir Manandhar,

Sounds like it may possibly be a bug. Can you please file a bug report at http://bugs.adobe.com/flex/ and include a simple test case and somebody can investigate.

Thanks,
Peter</description>
		<content:encoded><![CDATA[<p>@Sabbir Manandhar,</p>
<p>Sounds like it may possibly be a bug. Can you please file a bug report at <a href="http://bugs.adobe.com/flex/" rel="nofollow">http://bugs.adobe.com/flex/</a> and include a simple test case and somebody can investigate.</p>
<p>Thanks,<br />
Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sabbir Manandhar</title>
		<link>http://blog.flexexamples.com/2008/03/04/dynamically-adding-new-columns-to-a-datagrid-control-in-flex/comment-page-1/#comment-8939</link>
		<dc:creator>Sabbir Manandhar</dc:creator>
		<pubDate>Tue, 01 Feb 2011 10:30:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/03/04/dynamically-adding-new-columns-to-a-datagrid-control-in-flex/#comment-8939</guid>
		<description>I have two dataGrid tables displayed one at a time.when one is visible other in is invisible.i created columns for both of them dynamically. The problem is, the header text is not displayed at first. but when i display second table and come back to first table, the header are now visible. Again if i reload the dataProvider, the header text are not seen.

can anybody explain the problem?</description>
		<content:encoded><![CDATA[<p>I have two dataGrid tables displayed one at a time.when one is visible other in is invisible.i created columns for both of them dynamically. The problem is, the header text is not displayed at first. but when i display second table and come back to first table, the header are now visible. Again if i reload the dataProvider, the header text are not seen.</p>
<p>can anybody explain the problem?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nikolay nikolov</title>
		<link>http://blog.flexexamples.com/2008/03/04/dynamically-adding-new-columns-to-a-datagrid-control-in-flex/comment-page-1/#comment-8843</link>
		<dc:creator>nikolay nikolov</dc:creator>
		<pubDate>Mon, 17 Jan 2011 10:00:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/03/04/dynamically-adding-new-columns-to-a-datagrid-control-in-flex/#comment-8843</guid>
		<description>Hi Cap. I found the way that you can set up the width of the column.
First set up minWidth with value that you need, and then change it to be 0.
I had this problem too and this is my way to make it.
Nikolay</description>
		<content:encoded><![CDATA[<p>Hi Cap. I found the way that you can set up the width of the column.<br />
First set up minWidth with value that you need, and then change it to be 0.<br />
I had this problem too and this is my way to make it.<br />
Nikolay</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nikolay nikolov</title>
		<link>http://blog.flexexamples.com/2008/03/04/dynamically-adding-new-columns-to-a-datagrid-control-in-flex/comment-page-1/#comment-8841</link>
		<dc:creator>nikolay nikolov</dc:creator>
		<pubDate>Mon, 17 Jan 2011 08:36:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/03/04/dynamically-adding-new-columns-to-a-datagrid-control-in-flex/#comment-8841</guid>
		<description>Hi Cap. I found the way that you can set up the width of the column. 
First set up minWidth with value that you need, and then change it to be 0.
I had this problem too and this is my way to make it.
Nikolay</description>
		<content:encoded><![CDATA[<p>Hi Cap. I found the way that you can set up the width of the column.<br />
First set up minWidth with value that you need, and then change it to be 0.<br />
I had this problem too and this is my way to make it.<br />
Nikolay</p>
]]></content:encoded>
	</item>
</channel>
</rss>

