Hi Shishir,

Try calling gc.refresh(); in the method that handles the result. If it is
not working even after that, then use callLater. Something like this:

callLater(refreshgroup);

private function refreshgroup():void{
   gc.refresh();
}

Let us know if this worked.

Regards,
Venkat
www.venkatv.com


On Wed, Dec 3, 2008 at 6:44 PM, Shishir <[EMAIL PROTECTED]> wrote:

>
> Hi Vinod,
>
> Thanks for the reply. Can you please elaborate on "SWF files cannot
> load any local files or resources. You need to put
> the XML file inside your application. ".The reason why i ask this is
> because i have tried this example where he references an external XML
> file and it works perfectly fine:
>
>
> http://flexpearls.blogspot.com/2008/01/using-advanceddatagrid-as-tree-control.html
>
> Here the XML file is not a local resource.He has used the HTTPService
> tag to access an external xml file.
> Could you please guide me on the above issue as i am new to Flex?
>
> I am using FlexBuilder for Eclipse for the above task.
>
> Thanks,
> Shishir.
>
>
> On Dec 3, 5:46 pm, "Vinod M. Jacob" <[EMAIL PROTECTED]> wrote:
> > SWF files cannot load any local files or resources. You need to put
> > the XML file inside your application.
> >
> > On Wed, Dec 3, 2008 at 5:18 PM, Shishir <[EMAIL PROTECTED]> wrote:
> >
> > > Hi,
> >
> > > I am new to flex and have been facing a problem of grouping on
> > > Advanced DataGrid. I want to read the XML file from an external source
> > > and show that in the Advanced DataGrid form with a grouping on the
> > > first two columns . The problem is that if i am embedding the XML file
> > > in the code itself,then it is working fine. But if i am getting the
> > > data from an XML file then it is showing no data if i have grouped it
> > > on the two columns. But if i remove the grouping then it is working
> > > fine and showing correct ungrouped data in the advanced datagrid.Here
> > > is the code :
> >
> > > <?xml version="1.0"?>
> > > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
> > > creationComplete="http_srv.send()">
> > > <mx:Script>
> > > <![CDATA[
> > >        import mx.rpc.events.ResultEvent;
> > > import mx.collections.ArrayCollection;
> > > [Bindable]
> > > private var dpFlat:ArrayCollection;
> >
> > > private function dpHandler(evt:ResultEvent):void
> > > {
> > >        dpFlat=evt.result.books.stock;
> >
> > > }
> >
> > > ]]>
> > > </mx:Script>
> > > <mx:HTTPService id="http_srv" url="H:/Flex WorkSpace/Samples/
> > > books.xml" result="dpHandler(event)"/>
> > > <mx:AdvancedDataGrid id="myADG" width="100%" height="100%"
> > > defaultLeafIcon="{null}" initialize="gc.refresh();">
> > > <mx:dataProvider>
> > > <mx:GroupingCollection id="gc" source="{dpFlat}">
> > > <mx:Grouping>
> > > <mx:GroupingField name="category"/>
> > > </mx:Grouping>
> > > </mx:GroupingCollection>
> > > </mx:dataProvider>
> > > <mx:columns>
> > > <mx:AdvancedDataGridColumn dataField="category"
> > > headerText="Genre"/>
> > > <mx:AdvancedDataGridColumn dataField="name"
> > > headerText="Book"/>
> > > <mx:AdvancedDataGridColumn dataField="author" headerText="Author"/>
> > > <mx:AdvancedDataGridColumn dataField="description"
> > > headerText="Description"/>
> > > </mx:columns>
> > > </mx:AdvancedDataGrid>
> > > </mx:Application>
> >
> > > The XML file is as follows :
> >
> > >  <?xml version="1.0" encoding="iso-8859-1" ?>
> > > - <books>
> > > - <stock>
> > >  <name>The Picasso Code</name>
> > >  <author>Dan Blue</author>
> > >  <category>Fiction</category>
> > >  <description>Cubist paintings reveal a secret society of people who
> > > really look like that</description>
> > >  </stock>
> > > - <stock>
> > >  <name>Here With the Wind</name>
> > >  <author>Margaret Middle</author>
> > >  <category>Fiction</category>
> > >  <description>In this edition, nobody in the south really gives a
> > > damn</description>
> > >  </stock>
> > >  </books>
> >
> > > Any help in this regard would be highly appreciated.
> >
> > > Thanks,
> > > Shishir.
> >
> > > PS: How do i attach some documents here ?
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to