• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Spark DataGrid scrollToIndex?

Explorer ,
Jul 21, 2011 Jul 21, 2011

Copy link to clipboard

Copied

In Flex I used to use the dataGrid.scrollToIndex(XX) to scroll down to a selected row.

I can't seem to get anything to work for the Spark DataGrid in FB4.5.  Searching around I tried to impliment this:

dataGrid.ensureCellIsVisible(selectedSlideIndex);

dataGrid.setSelectedIndex(selectedSlideIndex);

The selectedSlideIndex is set when a row is selected to store the int.

I can't get the DataGrid to scroll to the index, OR select the index..

So what is the Spark DataGrid version of the MX DataGrid.scrollToIndex?

Views

7.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 03, 2011 Aug 03, 2011

Copy link to clipboard

Copied

Have you got the statement order right?:

dataGrid.setFocus();

dataGrid.dataProvider.addItemAt(item,dataGrid.dataProvider.length);

dataGrid.validateNow();

dataGrid.setSelectedIndex(dataGrid.dataProvider.length-1);

dataGrid.ensureCellIsVisible(dataGrid.selectedIndex);

- Rob

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 14, 2011 Dec 14, 2011

Copy link to clipboard

Copied

LATEST

This worked for me! Thanks BV!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Aug 04, 2011 Aug 04, 2011

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines