DataPagerFieldCollection 类

定义

表示 DataPager 控件所使用的 DataPagerField 对象的集合。Represents a collection of DataPagerField objects that are used by the DataPager control.

public ref class DataPagerFieldCollection : System::Web::UI::StateManagedCollection
public class DataPagerFieldCollection : System.Web.UI.StateManagedCollection
type DataPagerFieldCollection = class
    inherit StateManagedCollection
Public Class DataPagerFieldCollection
Inherits StateManagedCollection
继承
DataPagerFieldCollection

注解

您可以使用 DataPagerFieldCollection 类以编程方式管理一组 DataPagerField 对象。You can use the DataPagerFieldCollection class to programmatically manage a set of DataPagerField objects. 请注意,更常见的做法是以声明方式(而不是以编程方式)定义这些字段。Note that it is more typical to define these fields declaratively instead of programmatically.

您可以通过属性访问类的属性和方法 DataPagerFieldCollection DataPager.FieldsYou can access the properties and methods of the DataPagerFieldCollection class through the DataPager.Fields property. 您可以通过使用类的适当方法,添加、插入和移除 DataPagerField 对象 DataPagerFieldCollectionYou can add, insert, and remove DataPagerField objects by using the appropriate methods of the DataPagerFieldCollection class. 若要以编程方式 DataPagerField 从集合中检索对象,请执行以下操作之一:To programmatically retrieve DataPagerField objects from a collection, do one of following:

Count属性获取集合中的总项数。The Count property gets the total number of items in the collection. 它通常用于确定集合的上限。It is typically used to determine the upper bound of the collection. 您可以使用 AddInsertRemove 和方法添加项并删除集合中的项 RemoveAtYou can add items and remove items in the collection by using the Add, Insert, Remove, and RemoveAt methods.

构造函数

DataPagerFieldCollection(DataPager)

初始化 DataPagerFieldCollection 类的新实例。Initializes a new instance of the DataPagerFieldCollection class.

属性

Count

获取 StateManagedCollection 集合中包含的元素的数量。Gets the number of elements contained in the StateManagedCollection collection.

(继承自 StateManagedCollection)
Item[Int32]

获取集合中指定索引处的 DataPagerField 对象。Gets the DataPagerField object that is at the specified index in the collection.

方法

Add(DataPagerField)

将指定的 DataPagerField 对象追加到集合。Appends the specified DataPagerField object to the collection.

Clear()

StateManagedCollection 集合中删除所有项。Removes all items from the StateManagedCollection collection.

(继承自 StateManagedCollection)
CloneFields(DataPager)

创建当前集合的副本。Creates a copy of the current collection.

Contains(DataPagerField)

确定 DataPagerFieldCollection 集合是否包含指定的 DataPagerField 对象。Determines whether the DataPagerFieldCollection collection contains the specified DataPagerField object.

CopyTo(Array, Int32)

从特定的数组索引开始,将 StateManagedCollection 集合的元素复制到数组中。Copies the elements of the StateManagedCollection collection to an array, starting at a particular array index.

(继承自 StateManagedCollection)
CopyTo(DataPagerField[], Int32)

从目标数组的指定索引位置开始,将整个 DataPagerFieldCollection 集合复制到一维 Array 对象中。Copies the complete DataPagerFieldCollection collection to a one-dimensional Array object, starting at the specified index of the target array.

CreateKnownType(Int32)

创建由提供的索引标识的 DataPagerField 类型的默认实例。Creates a default instance of the DataPagerField type that is identified by the provided index.

Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetEnumerator()

返回循环访问 StateManagedCollection 集合的迭代器。Returns an iterator that iterates through the StateManagedCollection collection.

(继承自 StateManagedCollection)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetKnownTypes()

获取 DataPagerField 集合可以包含的 DataPagerFieldCollection 类型的数组。Gets an array of DataPagerField types that the DataPagerFieldCollection collection can contain.

GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
IndexOf(DataPagerField)

获取集合中特定的 DataPagerField 对象的索引。Gets the index of a specific DataPagerField object in the collection.

Insert(Int32, DataPagerField)

将指定的 DataPagerField 对象插入到 DataPagerFieldCollection 集合中的指定索引位置。Inserts the specified DataPagerField object into the DataPagerFieldCollection collection at the specified index.

MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
OnClear()

在派生类中替代时,在 Clear() 方法从集合中删除所有项之前执行附加工作。When overridden in a derived class, performs additional work before the Clear() method removes all items from the collection.

(继承自 StateManagedCollection)
OnClearComplete()

在所有项从集合中移除后执行附加处理。Performs additional processing after all items are removed from the collection.

OnInsert(Int32, Object)

在派生类中替代时,在 IList.Insert(Int32, Object)IList.Add(Object) 方法向集合中添加项之前执行附加工作。When overridden in a derived class, performs additional work before the IList.Insert(Int32, Object) or IList.Add(Object) method adds an item to the collection.

(继承自 StateManagedCollection)
OnInsertComplete(Int32, Object)

在向集合中添加项之后执行附加处理。Performs additional processing after an item is added to the collection.

OnRemove(Int32, Object)

在派生类中替代时,在 IList.Remove(Object)IList.RemoveAt(Int32) 方法从集合中删除指定项之前执行附加工作。When overridden in a derived class, performs additional work before the IList.Remove(Object) or IList.RemoveAt(Int32) method removes the specified item from the collection.

(继承自 StateManagedCollection)
OnRemoveComplete(Int32, Object)

在从集合中移除项之后执行附加处理。Performs additional processing after an item is removed from the collection.

OnValidate(Object)

验证指定的对象是否为 DataPagerField 对象。Verifies that the specified object is a DataPagerField object.

Remove(DataPagerField)

DataPagerField 集合中移除指定的 DataPagerFieldCollection 对象。Removes the specified DataPagerField object from the DataPagerFieldCollection collection.

RemoveAt(Int32)

移除 DataPagerField 集合中指定索引处的 DataPagerFieldCollection 对象。Removes the DataPagerField object at the specified index from the DataPagerFieldCollection collection.

SetDirty()

强制将整个 StateManagedCollection 集合序列化为视图状态。Forces the entire StateManagedCollection collection to be serialized into view state.

(继承自 StateManagedCollection)
SetDirtyObject(Object)

指示指定的 DataPagerField 对象将其完整状态记录到视图状态,而不是仅记录更改的信息。Instructs the specified DataPagerField object to record its complete state to view state, instead of recording only changed information.

ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

事件

FieldsChanged

DataPagerFieldCollection 集合中的字段更改时发生。Occurs when the fields in the DataPagerFieldCollection collection change.

显式接口实现

ICollection.Count

获取 StateManagedCollection 集合中包含的元素的数量。Gets the number of elements contained in the StateManagedCollection collection.

(继承自 StateManagedCollection)
ICollection.IsSynchronized

获取指示 StateManagedCollection 集合是否已同步(线程安全)的值。Gets a value indicating whether the StateManagedCollection collection is synchronized (thread safe). 此方法在所有情况下均返回 falseThis method returns false in all cases.

(继承自 StateManagedCollection)
ICollection.SyncRoot

获取可用于同步对 StateManagedCollection 集合的访问的对象。Gets an object that can be used to synchronize access to the StateManagedCollection collection. 此方法在所有情况下均返回 nullThis method returns null in all cases.

(继承自 StateManagedCollection)
IEnumerable.GetEnumerator()

返回循环访问 StateManagedCollection 集合的迭代器。Returns an iterator that iterates through the StateManagedCollection collection.

(继承自 StateManagedCollection)
IList.Add(Object)

StateManagedCollection 集合中添加一个项。Adds an item to the StateManagedCollection collection.

(继承自 StateManagedCollection)
IList.Clear()

StateManagedCollection 集合中删除所有项。Removes all items from the StateManagedCollection collection.

(继承自 StateManagedCollection)
IList.Contains(Object)

确定 StateManagedCollection 集合中是否包含特定值。Determines whether the StateManagedCollection collection contains a specific value.

(继承自 StateManagedCollection)
IList.IndexOf(Object)

确定 StateManagedCollection 集合中的指定项的索引。Determines the index of a specified item in the StateManagedCollection collection.

(继承自 StateManagedCollection)
IList.Insert(Int32, Object)

将项在指定索引处插入 StateManagedCollection 集合中。Inserts an item into the StateManagedCollection collection at the specified index.

(继承自 StateManagedCollection)
IList.IsFixedSize

获取指示 StateManagedCollection 集合是否具有固定大小的值。Gets a value indicating whether the StateManagedCollection collection has a fixed size. 此方法在所有情况下均返回 falseThis method returns false in all cases.

(继承自 StateManagedCollection)
IList.IsReadOnly

获取指示 StateManagedCollection 集合是否为只读的值。Gets a value indicating whether the StateManagedCollection collection is read-only.

(继承自 StateManagedCollection)
IList.Item[Int32]

获取指定索引处的 IStateManager 元素。Gets the IStateManager element at the specified index.

(继承自 StateManagedCollection)
IList.Remove(Object)

StateManagedCollection 集合中删除指定对象的第一个匹配项。Removes the first occurrence of the specified object from the StateManagedCollection collection.

(继承自 StateManagedCollection)
IList.RemoveAt(Int32)

删除指定索引处的 IStateManager 元素。Removes the IStateManager element at the specified index.

(继承自 StateManagedCollection)
IStateManager.IsTrackingViewState

获取指示 StateManagedCollection 集合是否保存对其视图状态的更改的值。Gets a value indicating whether the StateManagedCollection collection is saving changes to its view state.

(继承自 StateManagedCollection)
IStateManager.LoadViewState(Object)

还原 StateManagedCollection 集合以及其包含的 IStateManager 项的以前保存的视图状态。Restores the previously saved view state of the StateManagedCollection collection and the IStateManager items it contains.

(继承自 StateManagedCollection)
IStateManager.SaveViewState()

保存自页回发到服务器后对 StateManagedCollection 集合和该集合包含的每个 IStateManager 对象所做的更改。Saves the changes to the StateManagedCollection collection and each IStateManager object it contains since the time the page was posted back to the server.

(继承自 StateManagedCollection)
IStateManager.TrackViewState()

使 StateManagedCollection 集合及其包含的每个 IStateManager 对象跟踪对它们的视图状态所做的更改,以使它们可以在相同页的请求之间得以保持。Causes the StateManagedCollection collection and each of the IStateManager objects it contains to track changes to their view state so they can be persisted across requests for the same page.

(继承自 StateManagedCollection)

扩展方法

Cast<TResult>(IEnumerable)

IEnumerable 的元素强制转换为指定的类型。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

根据指定类型筛选 IEnumerable 的元素。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

启用查询的并行化。Enables parallelization of a query.

AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryableConverts an IEnumerable to an IQueryable.

适用于

另请参阅