Spread for ASP.NET 11 Product Documentation
TouchStripOpening
Spread for ASP.NET 11 Product Documentation > Client-Side Scripting Reference > Scripting Members > Events > TouchStripOpening

Occurs when Spread is going to display a touch strip.

Syntax

[Inline HTML]

<ELEMENT TouchStripOpening = "handler" ...>

[JavaScript]

FpSpread1.addEventListener("TouchStripOpening", handler, ...)

or

FpSpread1.onTouchStripOpening = handler

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, e.Spread, e.Area); 
             //Ensure that the customized TouchStrip from server-side is not displayed
                    e.Handled = true;
                }

            });
        }

</script>