GrapeCity MultiRow Windows Forms Documentation
SectionContextMenuStripNeeded Event


Occurs when a Section's shortcut menu is shown.
Syntax
<SRCategoryAttribute("Behavior")>
<SRDescriptionAttribute("Occurs when the ContextMenuStrip of a section is needed.")>
Public Event SectionContextMenuStripNeeded As EventHandler(Of SectionContextMenuStripNeededEventArgs)
Dim instance As GcMultiRow
Dim handler As EventHandler(Of SectionContextMenuStripNeededEventArgs)
 
AddHandler instance.SectionContextMenuStripNeeded, handler
[SRCategory("Behavior")]
[SRDescription("Occurs when the ContextMenuStrip of a section is needed.")]
public event EventHandler<SectionContextMenuStripNeededEventArgs> SectionContextMenuStripNeeded
Event Data

The event handler receives an argument of type SectionContextMenuStripNeededEventArgs containing data related to this event. The following SectionContextMenuStripNeededEventArgs properties provide information specific to this event.

PropertyDescription
ContextMenuStripGets or sets the shortcut menu for the section that raised the SectionContextMenuStripNeeded event.  
ScopeGets the cell area that the event occurs for.  
SectionIndexGets the index of the owner Section that the event occurs for.  
Remarks

This event can only be fired when the VirtualMode property is true or the DataSource property is not a null reference (Nothing in Visual Basic).

When you handle the SectionContextMenuStripNeeded event, the shortcut menu that you specify in the handler is shown whenever the user right-clicks a row unless the CellContextMenuStripNeeded overrides the shortcut menu for the specific cell that was clicked.

The SectionContextMenuStripNeeded event also occurs whenever the value of the Section.ContextMenuStrip property is retrieved, either programmatically or when the user right-clicks a row.

You can use the SectionContextMenuStripNeededEventArgs.SectionIndex property to determine the state of a section or the values it contains, and use this information to change or modify the SectionowContextMenuStripNeededEventArgs.ContextMenuStrip property. This property is initialized with the value of the section's Section.ContextMenuStrip property, which the event value overrides.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

GcMultiRow Class
GcMultiRow Members

 

 


Copyright © GrapeCity, inc. All rights reserved.