Skip to main content
You are viewing help content for a version that is no longer maintained/updated.
All docs
V17.2
  • DashboardMenuItem.template Property

    Gets or sets a knockout template for the extension.

    Namespace: DevExpress.Dashboard

    Assembly: DevExpress.Dashboard.v17.2.Web.Scripts.dll

    Declaration

    public string template { get; set; }

    Property Value

    Type Description
    String

    A string value that is an id of the knockout template.

    Remarks

    The code sample below shows you how to create a sample template for the dashboard menu item using the knockout ‘’template’’ binding. This template has a “sample-form” id and consists of a text box and button.

    <script type="text/html" id="sample-form">
        <div>Dashboard Name:</div>
        <div style="margin: 10px 0" data-bind="dxTextBox: { value: newName }"></div>
        <div data-bind="dxButton: { text: 'Save', onClick: saveAs }"></div>        
    </script>
    

    To use this template for a dashboard menu item, assign the id of the template to the template property.

    To learn more about knockout templates, refer to Knockout Documentation.

    See Also