Thanks for the feedback. I didn't know this was already raised. thanks for that.
I will check out JIRA.
Its not a show stopper, you can easily get the "real" e.columnIndex by just
adding the number of invisible columns that appear in the columns array before
e.columnIndex.
ie
var invisibleColCount:int=0;
for(var i:int=0;i<e.columnIndex+1;i++)
{
if(!this.columns[i].visible)
{
invisibleColCount++;
}
}
var realColumnIndex:int = e.columnIndex + invisbleColCount;
--- In [email protected], Andriy Panas <a.pa...@...> wrote:
>
> Hi all,
>
> DataGridColumn is not descendant of UIComponent, thus it does not have
> "includeInLayout" property.
>
> This issue with incorrect "columnIndex" in ListEvent object inside
> "itemRollOver"
> event handler was first reported in 2008, but now it has a status
> "Deferred". If this issue is important to you, go to JIRA and vote.
>
> https://bugs.adobe.com/jira/browse/SDK-17823
>
>
>
> --
> Best regards,
> Andriy Panas
>
>
>
> 2010/1/11 invertedspear <invertedsp...@...>
>
> >
> >
> > I think, but I'm not sure, that when you set your col0 to be invisible, you
> > need to also set includedInLayout = true;
> > ~mike
> >
> >
> > --- In [email protected] <flexcoders%40yahoogroups.com>,
> > "bhaq1972" <mbhaque@> wrote:
> > >
> > > I have an itemRollover event handler in my datagrid.
> > >
> > > This datagrid also has some invisble columns (i made them visible=false
> > during the datagrid's initialize event)
> > >
> > > Now if I make col0 invisible, and col1 visible,
> > > i.e.
> > > <mx:DataGridColumn dataField="col0" visible="false"..
> > > <mx:DataGridColumn dataField="col1" visible="true"..
> > >
> > > when I try to determine which column i'm rollong over...i'm getting the
> > wrong value
> > > public function itemRolloverHandler(e:ListEvent):void
> > > {
> > > var myDataField:String = this.columns[e.columnIndex].dataField;
> > >
> > > //myDataField="col0" but it should be "col1" as col0 is invsible
> > > }
> > > Is there anything I can do so e.columnIndex has the right value?
> > >
> > > thanks
> > >
> >
> >
> >
>