DataGridViewRowCollection.RemoveAt(Int32) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
从集合中移除位于指定位置的行。
public:
virtual void RemoveAt(int index);
public virtual void RemoveAt(int index);
abstract member RemoveAt : int -> unit
override this.RemoveAt : int -> unit
Public Overridable Sub RemoveAt (index As Integer)
参数
- index
- Int32
要删除的行的位置。
例外
index 小于零,大于集合中的行数减一。
关联的 DataGridView 控件正在执行下列操作之一,暂时阻止添加新行:
选择控件中的所有单元格。
清除所选内容。
-或-
此方法是从以下事件之一 DataGridView 的处理程序调用的:
-或-
index 等于集合中的行数,并且 AllowUserToAddRows 属性 DataGridView 设置为 true。
-或-
关联的 DataGridView 控件绑定到 IBindingList 包含的 AllowRemove 实现和 SupportsChangeNotification 属性值不是两者 true。