did u try callLater ?
Make your code that sets the selectedIndex a function and call it using
calllater.
http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00001438.html
yigit
markgoldin_2000 wrote:
>
> I am doing it here:
> override public function set dataProvider(value:Object):void
> {
> super.dataProvider = value;
> if (dataProvider.length != 0)
> {
> var cursor:IViewCursor = (dataProvider as
> ICollectionView).createCursor();
> var recNum:int = 0;
> while (!cursor.afterLast)
> {
> var obj:Object = cursor.current;
> if (obj["plan" + columnCount] == 1) // Show
> plan
> {
> selectedIndex = recNum;
> recNum++;
> }
> cursor.moveNext();
> }
> }
> }
>
> While I see that selectedIndex = recNum;
> is executed the highlighting effect is not taking a place.
> What is a right place to set selectedIndex?
>
> Thanks
>
>