DataGridViewSelectedRowCollection 类
定义
表示在 DataGridViewRow 中选定的 DataGridView 对象集合。Represents a collection of DataGridViewRow objects that are selected in a DataGridView.
public ref class DataGridViewSelectedRowCollection : System::Windows::Forms::BaseCollection, System::Collections::IList
[System.ComponentModel.ListBindable(false)]
public class DataGridViewSelectedRowCollection : System.Windows.Forms.BaseCollection, System.Collections.IList
type DataGridViewSelectedRowCollection = class
inherit BaseCollection
interface IList
interface ICollection
interface IEnumerable
Public Class DataGridViewSelectedRowCollection
Inherits BaseCollection
Implements IList
- 继承
- 属性
- 实现
注解
不保证集合中的行顺序与选择它们的顺序相匹配。The order of rows in the collection is not guaranteed to match the order in which they were selected.
属性
Count |
获取集合中元素的总数。Gets the total number of elements in the collection. (继承自 BaseCollection) |
IsReadOnly |
获取一个值,该值指示集合是否为只读。Gets a value indicating whether the collection is read-only. (继承自 BaseCollection) |
IsSynchronized |
获取一个值,该值指示对 ICollection 的访问是否同步。Gets a value indicating whether access to the ICollection is synchronized. (继承自 BaseCollection) |
Item[Int32] |
获取指定索引处的行。Gets the row at the specified index. |
List |
获取包含在 BaseCollection 实例中的元素的列表。Gets the list of elements contained in the BaseCollection instance. |
SyncRoot |
获取可用于同步对 BaseCollection 的访问的对象。Gets an object that can be used to synchronize access to the BaseCollection. (继承自 BaseCollection) |
方法
Clear() |
清除集合。Clears the collection. |
Contains(DataGridViewRow) |
确定指定的行是否包含在集合中。Determines whether the specified row is contained in the collection. |
CopyTo(Array, Int32) |
将当前一维 Array 的所有元素复制到指定的一维 Array 中(从指定的目标 Array 索引开始)。Copies all the elements of the current one-dimensional Array to the specified one-dimensional Array starting at the specified destination Array index. (继承自 BaseCollection) |
CopyTo(DataGridViewRow[], Int32) |
从指定索引处开始,将集合中的元素复制到指定的数组。Copies the elements of the collection to the specified array, starting at the specified index. |
CreateObjRef(Type) |
创建一个对象,该对象包含生成用于与远程对象进行通信的代理所需的全部相关信息。Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (继承自 MarshalByRefObject) |
Equals(Object) |
确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object. (继承自 Object) |
GetEnumerator() |
获取能够循环访问集合成员的对象。Gets the object that enables iterating through the members of the collection. (继承自 BaseCollection) |
GetHashCode() |
用作默认哈希函数。Serves as the default hash function. (继承自 Object) |
GetLifetimeService() |
检索控制此实例的生存期策略的当前生存期服务对象。Retrieves the current lifetime service object that controls the lifetime policy for this instance. (继承自 MarshalByRefObject) |
GetType() |
获取当前实例的 Type。Gets the Type of the current instance. (继承自 Object) |
InitializeLifetimeService() |
获取生存期服务对象来控制此实例的生存期策略。Obtains a lifetime service object to control the lifetime policy for this instance. (继承自 MarshalByRefObject) |
Insert(Int32, DataGridViewRow) |
在集合中的指定位置插入一行。Inserts a row into the collection at the specified position. |
MemberwiseClone() |
创建当前 Object 的浅表副本。Creates a shallow copy of the current Object. (继承自 Object) |
MemberwiseClone(Boolean) |
创建当前 MarshalByRefObject 对象的浅表副本。Creates a shallow copy of the current MarshalByRefObject object. (继承自 MarshalByRefObject) |
ToString() |
返回一个表示当前对象的 string。Returns a string that represents the current object. (继承自 Object) |
显式界面实现
ICollection.CopyTo(Array, Int32) |
从指定索引处开始,将集合中的元素复制到指定的数组。Copies the elements of the collection to the specified array, starting at the specified index. |
ICollection.Count |
获取集合中的元素数。Gets the number of elements in the collection. |
ICollection.IsSynchronized |
获取一个值,该值指示对集合的访问是否为同步的(线程安全)。Gets a value indicating whether access to the collection is synchronized (thread safe). |
ICollection.SyncRoot |
获取可用于同步对集合的访问的对象。Gets an object that can be used to synchronize access to the collection. |
IEnumerable.GetEnumerator() |
返回一个可用于循环访问集合的枚举数。Returns an enumerator that can be used to iterate through the collection. |
IList.Add(Object) |
实现 Add(Object) 方法。Implements the Add(Object) method. 总是引发 NotSupportedException。Always throws NotSupportedException. |
IList.Clear() |
实现 Clear() 方法。Implements the Clear() method. 总是引发 NotSupportedException。Always throws NotSupportedException. |
IList.Contains(Object) |
确定指定的值是否包含在集合中。Determines whether the specified value is contained in the collection. |
IList.IndexOf(Object) |
返回指定元素的索引。Returns the index of the specified element. |
IList.Insert(Int32, Object) |
实现 Insert(Int32, Object) 方法。Implements the Insert(Int32, Object) method. 总是引发 NotSupportedException。Always throws NotSupportedException. |
IList.IsFixedSize |
获取一个值,该值指示集合是否具有固定大小。Gets a value indicating whether the collection has a fixed size. |
IList.IsReadOnly |
获取一个值,该值指示集合是否为只读。Gets a value indicating whether the collection is read-only. |
IList.Item[Int32] |
获取指定索引处的元素。Gets the element at the specified index. |
IList.Remove(Object) |
实现 Remove(Object) 方法。Implements the Remove(Object) method. 总是引发 NotSupportedException。Always throws NotSupportedException. |
IList.RemoveAt(Int32) |
实现 RemoveAt(Int32) 方法。Implements the RemoveAt(Int32) method. 总是引发 NotSupportedException。Always throws NotSupportedException. |
扩展方法
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 转换为 IQueryable。Converts an IEnumerable to an IQueryable. |