Spread for ASP.NET 7.0 Product Documentation
onTouchStripOpening
Support Options
Spread for ASP.NET 7.0 Product Documentation > Client-Side Scripting Reference > Scripting Members > Events > onTouchStripOpening

Glossary Item Box

Occurs when Spread is going to display a touch strip.

Syntax

[Inline HTML]

<ELEMENT onTouchStripOpening = "handler" ...>

[Event Property]

FpSpread1.onTouchStripOpening = handler

[Named Script]

<SCRIPT FOR=FpSpread1 EVENT=onTouchStripOpening>

Arguments

event.Area
Location of the touch click
event.Handled
Whether to cancel the default menu
event.spread
Spread that raises the event
event.X
Gets or sets the x-coordinate of the touch strip's position relative to the Spread
event.Y
Gets or sets the y-coordinate of the touch strip's position relative to the Spread

Return Type

None

Remarks

This event is triggered when the touch menu is being opened. The TouchStripOpening event occurs regardless of the touch strip setting from the server-side. The area argument can be TOUCHSTRIP_CELL, TOUCHSTRIP_ROW, TOUCHSTRIP_COLUMN, or TOUCHSTRIP_CHART.

Example

This example JavaScript code maps the event for the Spread on the client side.

JavaScript Copy Code

<script type="text/javascript">

window.onload = function () {
            var spread = document.getElementById("FpSpread1");

            spread.addEventListener("TouchStripOpening", function (e) { 
                if (e.Area == e.TOUCHSTRIP_CELL) {
                    var builtInTouchStrip = new FarPoint.Web.Spread.TouchStrip();
                    //Show the TouchStrip
                    builtInTouchStrip.Show(e.X, e.Y); 
             //Ensure that the customized TouchStrip from server-side is not displayed
                    e.Handled = true;
                }

            });
        }

</script>

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.