<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Extracting the source from an IHierarchicalCollectionView</title>
	<atom:link href="http://techrays.wordpress.com/2008/03/14/extracting-the-source-from-an-ihierarchicalcollectionview/feed/" rel="self" type="application/rss+xml" />
	<link>http://techrays.wordpress.com/2008/03/14/extracting-the-source-from-an-ihierarchicalcollectionview/</link>
	<description>Not everything about technology, but close....</description>
	<lastBuildDate>Thu, 24 Dec 2009 04:56:05 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Sameer</title>
		<link>http://techrays.wordpress.com/2008/03/14/extracting-the-source-from-an-ihierarchicalcollectionview/#comment-1032</link>
		<dc:creator>Sameer</dc:creator>
		<pubDate>Fri, 13 Mar 2009 06:24:59 +0000</pubDate>
		<guid isPermaLink="false">http://techrays.wordpress.com/?p=18#comment-1032</guid>
		<description>Can you post a very simple sample of what you are trying? You can mail me at prosameer@gmail.com</description>
		<content:encoded><![CDATA[<p>Can you post a very simple sample of what you are trying? You can mail me at <a href="mailto:prosameer@gmail.com">prosameer@gmail.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shishir</title>
		<link>http://techrays.wordpress.com/2008/03/14/extracting-the-source-from-an-ihierarchicalcollectionview/#comment-1030</link>
		<dc:creator>Shishir</dc:creator>
		<pubDate>Thu, 12 Mar 2009 18:16:47 +0000</pubDate>
		<guid isPermaLink="false">http://techrays.wordpress.com/?p=18#comment-1030</guid>
		<description>Hi Sameer,

Thanks a lot for your reply.I implemented the above solution but unfortunately it didn&#039;t work for me.The reason is as follows :

I basically want to have the initial flat arrayCollection as my dataProvider every time i dynamically group on some column.But in this case after i have grouped once on a column the next time the dataProvider has a hierarchical structure and thus if i try to dynamically group by any other column,it throws an error and shows &quot;Not Available&quot; as the grouped entity.I basically wanted to retain the original flat ArrayCollection so that each time i want to dynamically group on any column i would be grouping with a flat ArrayCollection as the dataProvider.

I actually solved the problem a couple of days back,though with a pretty naive method.I am using a static variable inside my HeaderRenderer code.The first time when someone groups on a column i take the backup of my initial flat ArrayCollection and i use this backup up flat source to intialise my grid&#039;s dataProvider evertyime before it groups on the chosen column.

I would appreciate if you can tell me a better solution for the above problem.

Thanks a lot,
Shishir.</description>
		<content:encoded><![CDATA[<p>Hi Sameer,</p>
<p>Thanks a lot for your reply.I implemented the above solution but unfortunately it didn&#8217;t work for me.The reason is as follows :</p>
<p>I basically want to have the initial flat arrayCollection as my dataProvider every time i dynamically group on some column.But in this case after i have grouped once on a column the next time the dataProvider has a hierarchical structure and thus if i try to dynamically group by any other column,it throws an error and shows &#8220;Not Available&#8221; as the grouped entity.I basically wanted to retain the original flat ArrayCollection so that each time i want to dynamically group on any column i would be grouping with a flat ArrayCollection as the dataProvider.</p>
<p>I actually solved the problem a couple of days back,though with a pretty naive method.I am using a static variable inside my HeaderRenderer code.The first time when someone groups on a column i take the backup of my initial flat ArrayCollection and i use this backup up flat source to intialise my grid&#8217;s dataProvider evertyime before it groups on the chosen column.</p>
<p>I would appreciate if you can tell me a better solution for the above problem.</p>
<p>Thanks a lot,<br />
Shishir.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sameer</title>
		<link>http://techrays.wordpress.com/2008/03/14/extracting-the-source-from-an-ihierarchicalcollectionview/#comment-1019</link>
		<dc:creator>Sameer</dc:creator>
		<pubDate>Tue, 03 Mar 2009 12:40:35 +0000</pubDate>
		<guid isPermaLink="false">http://techrays.wordpress.com/?p=18#comment-1019</guid>
		<description>You can add a check at (1) above to see if you have done grouping or not. That is, the dataProvider is already hierarchical or not.
if (grid.dataProvider is IHierarchicalCollectionView)
{
        var hd:IHierarchicalData = IHierarchicalCollectionView(grid.dataProvider).source;
        groupingCollection.source = hd.getRoot();
}
else
{
        groupingCollection.source = ICollectionView(grid.dataProvider);
}</description>
		<content:encoded><![CDATA[<p>You can add a check at (1) above to see if you have done grouping or not. That is, the dataProvider is already hierarchical or not.<br />
if (grid.dataProvider is IHierarchicalCollectionView)<br />
{<br />
        var hd:IHierarchicalData = IHierarchicalCollectionView(grid.dataProvider).source;<br />
        groupingCollection.source = hd.getRoot();<br />
}<br />
else<br />
{<br />
        groupingCollection.source = ICollectionView(grid.dataProvider);<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shishir</title>
		<link>http://techrays.wordpress.com/2008/03/14/extracting-the-source-from-an-ihierarchicalcollectionview/#comment-1018</link>
		<dc:creator>Shishir</dc:creator>
		<pubDate>Tue, 03 Mar 2009 12:17:47 +0000</pubDate>
		<guid isPermaLink="false">http://techrays.wordpress.com/?p=18#comment-1018</guid>
		<description>Hi Sameer,

Nice post. I have a rather complex doubt related to the above article. I am creating an application where i have to dynamically group a column in advancedDataGrid.I have extended AdavncedDataGridRenderer to provide a drop-down menu kind of functionality which has one of the options as Dynamic Grouping.Let me explain my problem with the portion of the code in my MenuHeaderRenderer class where i handle the Dynamic Grouping :

var groupingCollection:GroupingCollection = new GroupingCollection();
var grouping:Grouping = new Grouping();
var groupingField:GroupingField = new  GroupingField(gridColumn.dataField);
grouping.fields = new Array();
groupingCollection.source = ICollectionView(grid.dataProvider);--(1)--
grouping.fields.push(groupingField);
groupingCollection.grouping = grouping;
groupingCollection.refresh();
grid.dataProvider = groupingCollection; --(2)--

My question : Is there a way of converting Hierarchical data to an ArrayCollection (flat data).The reason why i ask this is because initially my grid.dataProvider is an ArrayCollection but if i apply dynamic grouping for one column then the dataProvider becomes Hierarchical data in line 2. Because of this next time i apply dynamic grouping on any column then it gives error at --(1)--. I hope you have understood my problem.

Any help in this regard would be highly appreciated.

Thanks,
Shishir.</description>
		<content:encoded><![CDATA[<p>Hi Sameer,</p>
<p>Nice post. I have a rather complex doubt related to the above article. I am creating an application where i have to dynamically group a column in advancedDataGrid.I have extended AdavncedDataGridRenderer to provide a drop-down menu kind of functionality which has one of the options as Dynamic Grouping.Let me explain my problem with the portion of the code in my MenuHeaderRenderer class where i handle the Dynamic Grouping :</p>
<p>var groupingCollection:GroupingCollection = new GroupingCollection();<br />
var grouping:Grouping = new Grouping();<br />
var groupingField:GroupingField = new  GroupingField(gridColumn.dataField);<br />
grouping.fields = new Array();<br />
groupingCollection.source = ICollectionView(grid.dataProvider);&#8211;(1)&#8211;<br />
grouping.fields.push(groupingField);<br />
groupingCollection.grouping = grouping;<br />
groupingCollection.refresh();<br />
grid.dataProvider = groupingCollection; &#8211;(2)&#8211;</p>
<p>My question : Is there a way of converting Hierarchical data to an ArrayCollection (flat data).The reason why i ask this is because initially my grid.dataProvider is an ArrayCollection but if i apply dynamic grouping for one column then the dataProvider becomes Hierarchical data in line 2. Because of this next time i apply dynamic grouping on any column then it gives error at &#8211;(1)&#8211;. I hope you have understood my problem.</p>
<p>Any help in this regard would be highly appreciated.</p>
<p>Thanks,<br />
Shishir.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sameer</title>
		<link>http://techrays.wordpress.com/2008/03/14/extracting-the-source-from-an-ihierarchicalcollectionview/#comment-1012</link>
		<dc:creator>Sameer</dc:creator>
		<pubDate>Fri, 27 Feb 2009 08:54:29 +0000</pubDate>
		<guid isPermaLink="false">http://techrays.wordpress.com/?p=18#comment-1012</guid>
		<description>Set HierarchicalData as the dataProvider to the grid and use - 
IHierarchicalCollectionView.addChild(parent:Object, newChild:Object)

For example,
(adg.dataProvider as IHierarchicalCollectionView).addChild(adg.selectedItem, newChild);</description>
		<content:encoded><![CDATA[<p>Set HierarchicalData as the dataProvider to the grid and use &#8211;<br />
IHierarchicalCollectionView.addChild(parent:Object, newChild:Object)</p>
<p>For example,<br />
(adg.dataProvider as IHierarchicalCollectionView).addChild(adg.selectedItem, newChild);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cool</title>
		<link>http://techrays.wordpress.com/2008/03/14/extracting-the-source-from-an-ihierarchicalcollectionview/#comment-1007</link>
		<dc:creator>cool</dc:creator>
		<pubDate>Fri, 27 Feb 2009 06:38:07 +0000</pubDate>
		<guid isPermaLink="false">http://techrays.wordpress.com/?p=18#comment-1007</guid>
		<description>xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;

    
                    
                        
                        
                              
                                 
                                       
                                            
                                               
                                                   User1
                                                   User2
                                                   User3
                                                   User4
                                                
                                             
                                       
                                 
                              
                           
                        
                              

                        
                              
                                 
                                       
                                            
                                               
                                                   High
                                                   Medium
                                                   Low
                                                   Urgent
                                                   None
                                                
                                             
                                       
                                 
                              
                           
                        
                               
                                 
                                       
                                            
                                               
                                                   Assigned
                                                   Not Assigned
                                                   Not Started
                                                  
                                                
                                             
                                       
                                 
                              
                           
                    
                
        
               
               
    
     0 )
                {
                       
                        taskCol.removeItemAt(TaskRole1Grid.selectedIndex);
                       

                }
            }
    ]]&gt;
    
   
    
</description>
		<content:encoded><![CDATA[<p>xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243;?&gt;</p>
<p>                                                   User1<br />
                                                   User2<br />
                                                   User3<br />
                                                   User4</p>
<p>                                                   High<br />
                                                   Medium<br />
                                                   Low<br />
                                                   Urgent<br />
                                                   None</p>
<p>                                                   Assigned<br />
                                                   Not Assigned<br />
                                                   Not Started</p>
<p>     0 )<br />
                {</p>
<p>                        taskCol.removeItemAt(TaskRole1Grid.selectedIndex);</p>
<p>                }<br />
            }<br />
    ]]&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cool</title>
		<link>http://techrays.wordpress.com/2008/03/14/extracting-the-source-from-an-ihierarchicalcollectionview/#comment-1006</link>
		<dc:creator>cool</dc:creator>
		<pubDate>Fri, 27 Feb 2009 06:37:01 +0000</pubDate>
		<guid isPermaLink="false">http://techrays.wordpress.com/?p=18#comment-1006</guid>
		<description>

    
                    
                        
                        
                              
                                 
                                       
                                            
                                               
                                                   User1
                                                   User2
                                                   User3
                                                   User4
                                                
                                             
                                       
                                 
                              
                           
                        
                              

                        
                              
                                 
                                       
                                            
                                               
                                                   High
                                                   Medium
                                                   Low
                                                   Urgent
                                                   None
                                                
                                             
                                       
                                 
                              
                           
                        
                               
                                 
                                       
                                            
                                               
                                                   Assigned
                                                   Not Assigned
                                                   Not Started
                                                  
                                                
                                             
                                       
                                 
                              
                           
                    
                
        
               
               
    
     0 )
                {
                       
                        taskCol.removeItemAt(TaskRole1Grid.selectedIndex);
                       

                }
            }
    ]]&gt;
    
   
    
</description>
		<content:encoded><![CDATA[<p>User1<br />
                                                   User2<br />
                                                   User3<br />
                                                   User4</p>
<p>                                                   High<br />
                                                   Medium<br />
                                                   Low<br />
                                                   Urgent<br />
                                                   None</p>
<p>                                                   Assigned<br />
                                                   Not Assigned<br />
                                                   Not Started</p>
<p>     0 )<br />
                {</p>
<p>                        taskCol.removeItemAt(TaskRole1Grid.selectedIndex);</p>
<p>                }<br />
            }<br />
    ]]&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cool</title>
		<link>http://techrays.wordpress.com/2008/03/14/extracting-the-source-from-an-ihierarchicalcollectionview/#comment-1005</link>
		<dc:creator>cool</dc:creator>
		<pubDate>Fri, 27 Feb 2009 06:35:01 +0000</pubDate>
		<guid isPermaLink="false">http://techrays.wordpress.com/?p=18#comment-1005</guid>
		<description>I am using Advanced Datagrid. I am using three buttons. Add Task,AddSubTask,Delete Task.I am able to Add and Delete Task. I want to know how is it possible to add subtasks like tree structure.That means selecting a Task and adding Subtasks for that selected Task. For example, if i have added three tasks say Task1,Task2,Task3. If i select Task2 in the datagrid and then click the Add Sub Task button. If iam adding 2 subtasks for Task2, it should look like this(Like a tree structure)

Task1
Task2
        Sub Task1
        Sub Task2
Task3


Iam attaching the code also.

Please help me



    
                    
                        
                        
                              
                                 
                                       
                                            
                                               
                                                   User1
                                                   User2
                                                   User3
                                                   User4
                                                
                                             
                                       
                                 
                              
                           
                        
                              

                        
                              
                                 
                                       
                                            
                                               
                                                   High
                                                   Medium
                                                   Low
                                                   Urgent
                                                   None
                                                
                                             
                                       
                                 
                              
                           
                        
                               
                                 
                                       
                                            
                                               
                                                   Assigned
                                                   Not Assigned
                                                   Not Started
                                                  
                                                
                                             
                                       
                                 
                              
                           
                    
                
        
               
               
    
     0 )
                {
                       
                        taskCol.removeItemAt(TaskRole1Grid.selectedIndex);
                       

                }
            }
    ]]&gt;
    
   
    
</description>
		<content:encoded><![CDATA[<p>I am using Advanced Datagrid. I am using three buttons. Add Task,AddSubTask,Delete Task.I am able to Add and Delete Task. I want to know how is it possible to add subtasks like tree structure.That means selecting a Task and adding Subtasks for that selected Task. For example, if i have added three tasks say Task1,Task2,Task3. If i select Task2 in the datagrid and then click the Add Sub Task button. If iam adding 2 subtasks for Task2, it should look like this(Like a tree structure)</p>
<p>Task1<br />
Task2<br />
        Sub Task1<br />
        Sub Task2<br />
Task3</p>
<p>Iam attaching the code also.</p>
<p>Please help me</p>
<p>                                                   User1<br />
                                                   User2<br />
                                                   User3<br />
                                                   User4</p>
<p>                                                   High<br />
                                                   Medium<br />
                                                   Low<br />
                                                   Urgent<br />
                                                   None</p>
<p>                                                   Assigned<br />
                                                   Not Assigned<br />
                                                   Not Started</p>
<p>     0 )<br />
                {</p>
<p>                        taskCol.removeItemAt(TaskRole1Grid.selectedIndex);</p>
<p>                }<br />
            }<br />
    ]]&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sameer</title>
		<link>http://techrays.wordpress.com/2008/03/14/extracting-the-source-from-an-ihierarchicalcollectionview/#comment-324</link>
		<dc:creator>Sameer</dc:creator>
		<pubDate>Wed, 16 Jul 2008 15:54:49 +0000</pubDate>
		<guid isPermaLink="false">http://techrays.wordpress.com/?p=18#comment-324</guid>
		<description>Great.
I can explain the reason - 
The ArrayCollection that you have consists of Objects.
And Objects are not Bindable. So, whenever you change a property in an Object, no change event is triggered and no one is notified.
This is the reason why nothing is getting updated.
Using the API will make sure that all the things goes well.</description>
		<content:encoded><![CDATA[<p>Great.<br />
I can explain the reason &#8211;<br />
The ArrayCollection that you have consists of Objects.<br />
And Objects are not Bindable. So, whenever you change a property in an Object, no change event is triggered and no one is notified.<br />
This is the reason why nothing is getting updated.<br />
Using the API will make sure that all the things goes well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bryan</title>
		<link>http://techrays.wordpress.com/2008/03/14/extracting-the-source-from-an-ihierarchicalcollectionview/#comment-323</link>
		<dc:creator>Bryan</dc:creator>
		<pubDate>Wed, 16 Jul 2008 15:32:56 +0000</pubDate>
		<guid isPermaLink="false">http://techrays.wordpress.com/?p=18#comment-323</guid>
		<description>I have answered my own question, but I will post in case anyone else has this issue. When I attempted to modify the object directly in the ArrayCollection directly, and then refreshed the IHierarchicalCollectionView, the ADG didn&#039;t update. If I modified the node through the IHierarchicalCollectionView (using the IHierarchicalCollectionView&#039;s getChildren() addChildAt() and removeChildAt() methods), the ADG was updated.</description>
		<content:encoded><![CDATA[<p>I have answered my own question, but I will post in case anyone else has this issue. When I attempted to modify the object directly in the ArrayCollection directly, and then refreshed the IHierarchicalCollectionView, the ADG didn&#8217;t update. If I modified the node through the IHierarchicalCollectionView (using the IHierarchicalCollectionView&#8217;s getChildren() addChildAt() and removeChildAt() methods), the ADG was updated.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
