Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

ListView.CacheVirtualItems Event

Occurs when the contents of the display area for a ListView in virtual mode has changed, and the ListView determines that a new range of items is needed.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

public event CacheVirtualItemsEventHandler CacheVirtualItems
/** @event */
public void add_CacheVirtualItems (CacheVirtualItemsEventHandler value)

/** @event */
public void remove_CacheVirtualItems (CacheVirtualItemsEventHandler value)

In JScript, you can handle the events defined by a class, but you cannot define your own.
Not applicable.

This event only occurs when VirtualMode is true. Handling this event allows the ListView to update the item information held in the cache so that it is readily available. This can improve performance on large lists, or lists whose items are expensive to calculate.

For more information about handling events, see Consuming Events.

The following code example demonstrates the use of this member. In the example, the event handler checks to make sure a cache refresh is really necessary, and then rebuilds the cache. This code example is part of a larger example provided for the VirtualMode property.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.