Hit Information

Sometimes you may need to define which element is located at particular screen coordinates. For instance, you may have to define which element of a Pivot Grid Control an end-user has clicked. For this purpose, PivotGridControl implements the PivotGridControl.CalcHitInfo method. It accepts a specific point, measured in Pivot Grid Control client coordinates as its pt parameter, and returns a hit info object that contains information on the corresponding element.

The PivotGridHitInfo object exposes information about a test point via a number of its properties that can be grouped into two categories:

Example: How to Copy Data to the Clipboard

Assume that the PopupMenu component has already been placed on a form. It has a single menu item - "Copy to Clipboard". This context menu is invoked when an end-user right-clicks within the Data Area. The item's ItemClick event is handled to copy data to the Clipboard. To copy the selected cells to the Clipboard the PivotGridCells.CopySelectionToClipboard method is used.