DataGridViewRowHeaderCell.GetInheritedContextMenuStrip(Int32) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
检索指定行的继承快捷菜单。
public:
override System::Windows::Forms::ContextMenuStrip ^ GetInheritedContextMenuStrip(int rowIndex);
public override System.Windows.Forms.ContextMenuStrip GetInheritedContextMenuStrip(int rowIndex);
public override System.Windows.Forms.ContextMenuStrip? GetInheritedContextMenuStrip(int rowIndex);
override this.GetInheritedContextMenuStrip : int -> System.Windows.Forms.ContextMenuStrip
Public Overrides Function GetInheritedContextMenuStrip (rowIndex As Integer) As ContextMenuStrip
参数
- rowIndex
- Int32
要获取的 ContextMenuStrip 行的索引。 索引必须 -1 才能指示列标题行。
返回
如果存在行,则 ContextMenuStrip 为行;否则为 ContextMenuStrip 继承自 DataGridView。
例外
单元格的属性值 DataGridView 不是 null ,指定的 rowIndex 值小于 0 或大于控件中的行数减 1。