DataGridViewHeaderCell.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
此实现忽略。
返回
如果ContextMenuStripDataGridViewHeaderCell已分配或具有快捷菜单,则为 ADataGridView;否则为 null。
注解
DataGridViewHeaderCell如果没有快捷菜单,DataGridViewHeaderCell该菜单将从中DataGridView继承快捷菜单。
DataGridView如果它还没有快捷菜单,则GetInheritedContextMenuStrip该方法将返回null。