GrapeCity MultiRow Windows Forms Documentation
CellTouchToolBarNeeded Event


Occurs when a cell's shortcut menu is shown.
Syntax
<SRDescriptionAttribute("ERROR: [Cannot found the resource]")>
<SRCategoryAttribute("Behavior")>
Public Event CellTouchToolBarNeeded As EventHandler(Of CellTouchToolBarNeededEventArgs)
Dim instance As GcMultiRow
Dim handler As EventHandler(Of CellTouchToolBarNeededEventArgs)
 
AddHandler instance.CellTouchToolBarNeeded, handler
[SRDescription("ERROR: [Cannot found the resource]")]
[SRCategory("Behavior")]
public event EventHandler<CellTouchToolBarNeededEventArgs> CellTouchToolBarNeeded
Event Data

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

PropertyDescription
CellIndexGets the cell index in its parent Section. (Inherited from GrapeCity.Win.MultiRow.CellEventArgs)
CellNameGets the cell name. (Inherited from GrapeCity.Win.MultiRow.CellEventArgs)
RowIndexGets the index of the owner Row that the event occurs for. (Inherited from GrapeCity.Win.MultiRow.CellEventArgs)
ScopeGets the area of the cell that the event occurs for. (Inherited from GrapeCity.Win.MultiRow.CellEventArgs)
SectionIndexGets the index of the owner Section that the event occurs for. (Inherited from GrapeCity.Win.MultiRow.CellEventArgs)
TouchToolBarGets or sets the touch toolbar for the cell that raised the GcMultiRow.CellTouchToolBarNeeded event.  
Remarks

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

When you handle the CellTouchToolBarNeeded event, the shortcut menu that you specify in the handler is shown whenever the user right-clicks a cell. This is useful when you want to display a shortcut menu determined by the current state or value of a cell.

The CellTouchToolBarNeeded event also occurs when the value of the Cell.TouchToolBar property is retrieved, either programmatically or when the user right-clicks a cell.

You can use the CellEventArgs.CellIndex and CellEventArgs.RowIndex properties to determine the state or value of a cell, and use this information to change or modify the CellTouchToolBarNeededEventArgs.TouchToolBar property. This property is initialized with the value of the cell's Cell.TouchToolBar property, which the event value overrides.

Handle the CellTouchToolBarNeeded event when working with large amounts of data to avoid the performance penalties of setting the cell's Cell.TouchToolBar value for multiple cells.

You can also specify shortcut menus for individual sections rather than individual cells by setting the section's Section.TouchToolBar property or by handling the SectionTouchToolBarNeeded event. The cell's Cell.TouchToolBar property setting overrides the section's Section.TouchToolBar property setting, and the CellTouchToolBarNeeded event overrides both the SectionTouchToolBarNeeded event and the section's Section.TouchToolBar property setting. You can specify a a null reference (Nothing in Visual Basic) for a cell shortcut menu to prevent a section shortcut menu from being overridden.

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.