You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by mark goldin <ma...@gmail.com> on 2016/05/27 14:48:18 UTC

Sroll to index position in ADG

I am trying to scroll adg after a data provider has been set.

Here is the code I am using:

_selectedIndex = _selectedIndex == dataProvider.length - 1 ? _selectedIndex
- 1 : _selectedIndex; // _selectedIndex is selectedIndex before
dataprovider was reloaded
this.selectedIndex = _selectedIndex;
this.scrollToIndex(_selectedIndex);

My adg can show hierarchical data  as well as flat data. Seems like the
above code works fine when data is hierarchical.

Any idea why wouldn't it work with the flat data?

Thanks