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.Fields透過屬性存取類別的屬性和方法。You can access the properties and methods of the DataPagerFieldCollection class through the DataPager.Fields property. 您可以使用DataPagerFieldCollection類別的適當方法來DataPagerField新增、插入和移除物件。You 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. Add可以使用Insert 、、RemoveAt和方法,在集合中加入專案和移除專案。RemoveYou 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 的淺層複本 (Shallow Copy)。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.

適用於

另請參閱