Try sticking that in override prepare() or set data(), and make sure that data isn't null, and I bet you that it'll work.
-TH --- In flexcoders@yahoogroups.com, "turbo_vb" <TimHoff@...> wrote: > > hmm, don't know what to tell you. The following works fine: > > var myDataProvider:ArrayCollection = DataGrid( owner ).dataProvider as > ArrayCollection; > > -TH > > --- In flexcoders@yahoogroups.com, "sdl1326" <azsl1326-email@> wrote: > > > > No, I was casting "owner" and got that error. > > i.e. - Datagrid(owner).dataprovider > > > > --- In flexcoders@yahoogroups.com, "turbo_vb" <TimHoff@> wrote: > > > > > > That error looks like you were trying to cast "parent" instead of "owner". > > > > > > -TH > > > > > > --- In flexcoders@yahoogroups.com, "sdl1326" <azsl1326-email@> wrote: > > > > > > > > Thanks. I should have mentioned that I did initially that and was > > > > getting the following error: > > > > > > > > TypeError: Error #1034: Type Coercion failed: cannot convert > > > > spark.components.gridClasses::GridLayer@260fac29 to > > > > spark.components.DataGrid > > > > > > > > > > > > --- In flexcoders@yahoogroups.com, "turbo_vb" <TimHoff@> wrote: > > > > > > > > > > Cast the "owner" property to DataGrid. > > > > > > > > > > -TH > > > > > > > > > > --- In flexcoders@yahoogroups.com, "sdl1326" azsl1326-email@ wrote: > > > > > > > > > > > > I have a custom itemrenderer in a GridColumn of a Spark Datagrid. I > > > > need > > > > > > to get access to the Datagrid from the custom itemrenderer. What's > > > > the > > > > > > best way to do this? > > > > > > > > > > > > Thanks, in advance. > > > > > > > > > > > > > > > > > > > > >