DirectoryVirtualListView Class
The DirectoryVirtualListView class specifies how to conduct a virtual list view search. A virtual list view search enables users to view search results as address-book style virtual list views. It is specifically designed for very large result sets. Search data is retrieved in contiguous subsets of a sorted directory search.
Assembly: System.DirectoryServices (in System.DirectoryServices.dll)
| Name | Description | |
|---|---|---|
![]() | DirectoryVirtualListView() | Initializes a new instance of the DirectoryVirtualListView class. |
![]() | DirectoryVirtualListView(Int32) | Initializes a new instance of the DirectoryVirtualListView class with the after count set. |
![]() | DirectoryVirtualListView(Int32, Int32, Int32) | Initializes a new instance of the DirectoryVirtualListView class with the before count, after count, and offset set. |
![]() | DirectoryVirtualListView(Int32, Int32, Int32, DirectoryVirtualListViewContext) | Initializes a new instance of the DirectoryVirtualListView class with the before count, after count, offset and context set. |
![]() | DirectoryVirtualListView(Int32, Int32, String) | Initializes a new instance of the DirectoryVirtualListView class with the before count, after count, and target set. |
![]() | DirectoryVirtualListView(Int32, Int32, String, DirectoryVirtualListViewContext) | Initializes a new instance of the DirectoryVirtualListView class with the before count, after count, target and context set. |
| Name | Description | |
|---|---|---|
![]() | AfterCount | Gets or sets a value to indicate the number of entries after the target entry that the client is requesting from the server. |
![]() | ApproximateTotal | Gets or sets a value to indicate the estimated total count of items in the list. |
![]() | BeforeCount | Gets or sets a value to indicate the number of entries before the target entry that the client is requesting from the server. |
![]() | DirectoryVirtualListViewContext | Gets or sets a value to indicate the virtual list view search response. |
![]() | Offset | Gets or sets a value to indicate the target entry's offset within the list. |
![]() | Target | The Target property gets or sets a value to indicate the target entry that was requested by the client. |
![]() | TargetPercentage | The TargetPercentage property gets or sets a value to indicate the estimated target entry's requested offset within the list, as a percentage of the total number of items in the list. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | Determines whether the specified object is equal to the current object.(Inherited from Object.) |
![]() | Finalize() | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.) |
![]() | GetHashCode() | Serves as the default hash function. (Inherited from Object.) |
![]() | GetType() | |
![]() | MemberwiseClone() | |
![]() | ToString() | Returns a string that represents the current object.(Inherited from Object.) |
The following C# example shows how to retrieve the first 30 entries in a result set.
using System.DirectoryServices; ... DirectorySearcher src = new DirectorySearcher("…"); src.VirtualListView = new DirectoryVirtualListView(0,30); foreach(SearchResult res in src.FindAll() ) { Console.WriteLine(…"); }
The following C# example shows how to retrieve the first 50 entries in a result set that start with the letters "Ha".
using System.DirectoryServices; ... DirectorySearcher src = new DirectorySearcher("…"); src.VirtualListView = new DirectoryVirtualListView(0,50, "Ha"); foreach(SearchResult res in src.FindAll() ) { Console.WriteLine(…"); }
The following C# example shows how to retrieve the first 100 entries at the 60% approximate target.
using System.DirectoryServices; ... // First VLV calls. DirectorySearcher src = new DirectorySearcher("…"); src.VirtualListView = new DirectoryVirtualListView(100); foreach(SearchResult res in src.FindAll() ) { Console.WriteLine(…"); } // Second Call, the VLV context is still attached to the DirectorySearcher. src.VirtualListView.TargetPercentage = 60; src.VirtualListView.BeforeCount = 50; src.VirtualListView.AfterCount = 50; foreach(SearchResult res in src.FindAll() ) { Console.WriteLine(…"); }
Available since 2.0
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


