Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

DataListItemCollection Class

Represents the collection of DataListItem objects in the DataList control. This class cannot be inherited.

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)

public sealed class DataListItemCollection : ICollection, IEnumerable
public final class DataListItemCollection implements ICollection, IEnumerable
public final class DataListItemCollection implements ICollection, IEnumerable

The DataListItemCollection class represents a collection of DataListItem objects, which in turn represent the data items in a DataList control. To programmatically retrieve DataListItem objects from a DataList control, use one of the following methods:

  • Use the indexer to get a single DataListItem object from the collection, using array notation.

  • Use the CopyTo method to copy the contents of the collection to a System.Array object, which can then be used to get items from the collection.

  • Use the GetEnumerator method to create a System.Collections.IEnumerator interface, which can then be used to get items from the collection.

The Count property specifies the total number of items in the collection and is commonly used to determine the upper bound of the collection.

System.Object
  System.Web.UI.WebControls.DataListItemCollection
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

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

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.