ListView.ensureVisible method

Applies to Windows and Windows Phone

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

Syntax


listView.ensureVisible(value);

Parameters

value

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]

Minimum supported phone

Windows Phone 8.1

Namespace

WinJS.UI

Library

Ui.js

See also

ListView

 

 

Show:
© 2014 Microsoft. All rights reserved.