DataGridViewColumnHeaderCell.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。
例外
rowIndex 不是 -1。