Spread for ASP.NET 9.0 Product Documentation
TouchStripItem

The TouchStripItem class consists of the following members. This class inherits from the MenuItem class.

Constructor Description
public TouchStripItem() : MenuItem(); Initializes a new instance of the MenuItem class
public TouchStripItem(text) : MenuItem(text); Initializes a new touch strip item with the displayed text value
public TouchStripItem(text, imageUrl) : MenuItem(text, imageUrl); Initializes a new touch strip item with the displayed text value and icon image Url
Property Description
public int Width {get; set;} Gets or sets the touch strip item width

Example

This is a sample that creates a touch strip. On the client side, the script would look like this:

JavaScript
Copy Code
<script type="text/javascript">
window.onload = function () {
    var spread = document.getElementById("FpSpread1");
   
        spread.addEventListener("TouchStripOpening", function (e) {
            var touchStrip = new FarPoint.Web.Spread.TouchStrip();
            touchStrip.Items.push(new FarPoint.Web.Spread.TouchStripItem("Test"));
            touchStrip.Show(e.X, e.Y, e.Spread, e.Area);
            e.Handled = true;
            touchStrip.AddEventListener("Clicked", function (e) { //global touch strip event
                alert("Clicked");
            });
            touchStrip.Items[0].AddEventListener("Clicked", function (e) { //touch strip item event
                alert("menu item");
            });
         });
}
</script>

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options | Documentation Feedback