ListView.ensureVisible method

This topic has not yet been rated - Rate this topic

Makes the item at the specified index visible. If necessary, the ListView will scroll to the item.

Syntax


listView.ensureVisible(itemIndex);

Parameters

itemIndex

Type: Number

The index of the item to scroll into view.

Return value

This method does not return a value.

Remarks

When the ListView control's loadingBehavior is set to "incremental", ensureVisible might not work for those items that the ListView hasn't loaded yet. You can force the ListView to load more items by calling loadMorePages. The ensureVisible method always works when the loadingBehavior is "randomaccess".

Calling ensureVisible when the ListView is hidden has no effect.

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Namespace

WinJS.UI

Library

Ui.js

See also

ListView

 

 

Build date: 12/5/2012

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.