DataGridViewCellCollection 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
代表一組細胞。DataGridViewRow
public ref class DataGridViewCellCollection : System::Windows::Forms::BaseCollection, System::Collections::IList
[System.ComponentModel.ListBindable(false)]
public class DataGridViewCellCollection : System.Windows.Forms.BaseCollection, System.Collections.IList
[<System.ComponentModel.ListBindable(false)>]
type DataGridViewCellCollection = class
inherit BaseCollection
interface IList
interface ICollection
interface IEnumerable
Public Class DataGridViewCellCollection
Inherits BaseCollection
Implements IList
- 繼承
- 屬性
- 實作
備註
DataGridViewCellCollection 物件由屬性檢索 DataGridViewRow.Cells 。
建構函式
| 名稱 | Description |
|---|---|
| DataGridViewCellCollection(DataGridViewRow) |
初始化 DataGridViewCellCollection 類別的新執行個體。 |
屬性
| 名稱 | Description |
|---|---|
| Count |
取得集合中元素的總數。 (繼承來源 BaseCollection) |
| IsReadOnly |
會獲得一個值,表示該集合是否為唯讀。 (繼承來源 BaseCollection) |
| IsSynchronized |
會取得一個值,表示存取是否 ICollection 同步。 (繼承來源 BaseCollection) |
| Item[Int32] |
取得或設定格子到所提供的索引位置。 在 C# 中,這個屬性就是類別的 DataGridViewCellCollection 索引器。 |
| Item[String] |
取得或設定欄位中以所提供名稱的儲存格。 在 C# 中,這個屬性就是類別的 DataGridViewCellCollection 索引器。 |
| List | |
| SyncRoot |
取得一個物件,可用來同步存取 BaseCollection。 (繼承來源 BaseCollection) |
方法
事件
| 名稱 | Description |
|---|---|
| CollectionChanged |
當集合被更改時會發生。 |
明確介面實作
| 名稱 | Description |
|---|---|
| ICollection.CopyTo(Array, Int32) |
將集合中的元素複製到指定的陣列,從指定的索引開始。 |
| ICollection.Count |
取得集合中包含的項目數目。 |
| ICollection.IsSynchronized |
取得值,指出集合的存取是否同步處理 (線程安全)。 |
| ICollection.SyncRoot |
取得對象,這個物件可用來同步存取集合。 |
| IEnumerable.GetEnumerator() |
傳回逐一查看集合的列舉值。 |
| IList.Add(Object) |
將一件物品加入收藏。 |
| IList.Clear() |
清空了收款。 |
| IList.Contains(Object) |
判斷集合是否包含指定的值。 |
| IList.IndexOf(Object) |
決定集合中特定項目的索引。 |
| IList.Insert(Int32, Object) |
將物品插入指定位置。 |
| IList.IsFixedSize |
取得值,指出集合是否具有固定大小。 |
| IList.IsReadOnly |
取得值,指出集合是否具有固定大小。 |
| IList.Item[Int32] |
取得或設定位於指定索引處的專案。 |
| IList.Remove(Object) |
移除集合中特定物件的首次出現。 |
| IList.RemoveAt(Int32) |
在指定索引處移除 。DataGridViewCell |
擴充方法
| 名稱 | Description |
|---|---|
| AsParallel(IEnumerable) |
啟用查詢的平行處理。 |
| AsQueryable(IEnumerable) |
將 IEnumerable 轉換成 IQueryable。 |
| Cast<TResult>(IEnumerable) |
將 IEnumerable 的項目轉換成指定的型別。 |
| OfType<TResult>(IEnumerable) |
根據指定的型別篩選 IEnumerable 的專案。 |