DataGridViewRowCollection 类
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
DataGridViewRow 对象的集合。
public ref class DataGridViewRowCollection : System::Collections::IList
[System.ComponentModel.ListBindable(false)]
public class DataGridViewRowCollection : System.Collections.IList
[<System.ComponentModel.ListBindable(false)>]
type DataGridViewRowCollection = class
interface IList
interface ICollection
interface IEnumerable
[<System.ComponentModel.ListBindable(false)>]
type DataGridViewRowCollection = class
interface ICollection
interface IEnumerable
interface IList
Public Class DataGridViewRowCollection
Implements IList
- 继承
-
DataGridViewRowCollection
- 属性
- 实现
包含 DataGridViewRowCollectionDataGridViewRow 控件中的 DataGridView 对象。 可以通过 控件 Rows 属性检索此类的实例。 集合通过 属性维护对 控件的 DataGridView 引用。
为了提高性能, DataGridViewRowCollection 包括共享行和非共享行。 共享行共享内存以降低大型记录集的成本。 如果记录集非常大,应注意尽可能多地共享行。
有关详细信息,请参阅 缩放 Windows 窗体 DataGridView 控件的最佳做法。
Count |
获取集合中的行数。 |
Data |
获取拥有集合的 DataGridView。 |
Item[Int32] |
获取位于指定索引处的 DataGridViewRow。 |
List |
获取 DataGridViewRow 对象数组。 |
Collection |
在该集合的内容发生更改时发生。 |
ICollection. |
从指定索引位置开始将集合中的元素复制到 Array。 |
ICollection. |
获取集合中包含的元素数。 |
ICollection. |
获取一个值,该值指示对集合的访问是否为同步的(线程安全)。 |
ICollection. |
获取可用于同步对集合的访问的对象。 |
IEnumerable. |
返回一个循环访问集合的枚举器。 |
IList. |
将 DataGridViewRow 添加到集合。 |
IList. |
从集合中移除所有项。 |
IList. |
确定集合中是否包含指定的项。 |
IList. |
返回集合中的指定项的索引。 |
IList. |
将 DataGridViewRow 插入到集合中的指定索引处。 |
IList. |
获取一个值,该值指示集合是否具有固定大小。 |
IList. |
获取一个值,该值指示集合是否为只读。 |
IList. |
获取或设置指定索引处的元素。 |
IList. |
从集合中移除指定的 DataGridViewRow。 |
IList. |
从集合中删除位于指定位置的 DataGridViewRow。 |
Cast<TResult>(IEnumerable) |
将 IEnumerable 的元素强制转换为指定的类型。 |
Of |
根据指定类型筛选 IEnumerable 的元素。 |
As |
启用查询的并行化。 |
As |
将 IEnumerable 转换为 IQueryable。 |
产品 | 版本 |
---|---|
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |