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" <[EMAIL PROTECTED]> 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; > } > } >

