first of all the datagrid is not initialized before it is drawn on 
the screen, you can use public get and set, and a bindable var that 
holds your data, or you can send the data after you catch the 
creationComplete event on the titlewindow.


--- In [email protected], "valdhor" <[EMAIL PROTECTED]> wrote:
>
> I'm still a newbie but it looks as though you are trying to add a
> datagrid to a TitleWindow container.
> 
> You need to create the datagrid, set its dataProvider, then add it 
as
> a child to the TitleWindow container.
> 
> Something like (Untested code follows):
> 
> var myExcelDG:DataGrid = new DataGrid();
> myExcelDG.dataProvider = 
projCatHolder.allProjectsView.myDG.dataProvider;
> dgExcel.addChild(myExcelDG);
> 
> --- In [email protected], "Mark" <pusateri02@> wrote:
> >
> > from the code below can any tell me why I get this error?  1119: 
> > Access of possibly undefined property myExcelDG through a 
reference 
> > with static type mx.containers:TitleWindow
> > 
> > I'm trying to pass data from one dataGrid to a dataGrid on the 
> > titleWindow.  Any ideas?
> > 
> > public var dgExcel:TitleWindow;
> > private var windowWidth:Number;
> > //
> > private function showWindow():void {
> >         trace("WIDTH " + this.width);
> >         windowWidth = this.width;
> >         dgExcel = excelPopUp(PopUpManager.createPopUp( this, 
> > excelPopUp , true)); 
> >         dgExcel.x=50;
> >         dgExcel.y=50;
> >         dgExcel.width = windowWidth - 100;
> >         // Pass a reference to the TitleWindow container
> >         dgExcel.myExcelDG.dataProvider = 
> > projCatHolder.allProjectsView.myDG.dataProvider;
> > }
> > private function onAppResize (oEvt:Event):void {
> >         var windowWidth:Number = this.width;
> >         if (dgExcel) {
> >             dgExcel.width = windowWidth - 100;
> >         }
> > }
> >
>


Reply via email to