menu

ASP.NET MVC - EJ2

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class DropDownTree - ASP.NETMVC-EJ2 API Reference | Syncfusion

    Show / Hide Table of Contents

    Class DropDownTree

    Inheritance
    System.Object
    Syncfusion.EJ2.EJTagHelper
    DropDownTree
    Namespace: Syncfusion.EJ2.DropDowns
    Assembly: Syncfusion.EJ2.dll
    Syntax
    public class DropDownTree : EJTagHelper

    Constructors

    DropDownTree()

    Declaration
    public DropDownTree()

    Properties

    ActionFailure

    Triggers when the data fetch request from the remote server fails.

    Declaration
    public string ActionFailure { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    ActionFailureTemplate

    Specifies the template that renders to the popup list content of the Dropdown Tree component when the data fetch request from the remote server fails.

    Declaration
    public string ActionFailureTemplate { get; set; }
    Property Value
    Type Description
    System.String

    The default value is "The Request Failed"

    AllowFiltering

    When allowFiltering is set to true, it shows the filter bar (search text box) of the component. The filter action retrieves matched items through the filtering event based on the characters typed in the search text box. If no match is found, the value of the noRecordsTemplate property will be displayed.

    Declaration
    public bool AllowFiltering { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is false

    AllowMultiSelection

    Enables or disables the multi-selection of items. To select multiple items: Select the items by holding down the Ctrl key when clicking on the items. Select consecutive items by clicking the first item to select and hold down the Shift key and click the last item to select.

    Declaration
    public bool AllowMultiSelection { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is false

    BeforeOpen

    Fires when popup opens before animation.

    Declaration
    public string BeforeOpen { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    Blur

    Triggers when the Dropdown Tree input element gets focus-out.

    Declaration
    public string Blur { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    Change

    Triggers when an item in a popup is selected or when the model value is changed by user.

    Declaration
    public string Change { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    ChangeOnBlur

    By default, the Dropdown Tree component fires the change event while focusing out the component. If you want to fire the change event on every value selection and remove, then disable this property.

    Declaration
    public bool ChangeOnBlur { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is true

    Close

    Fires when popup close after animation completion.

    Declaration
    public string Close { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    Created

    Triggers when the Dropdown Tree is created successfully.

    Declaration
    public string Created { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    CssClass

    Specifies the CSS classes to be added with the root and popup element of the Dropdown Tree component. that allows customization of appearance.

    Declaration
    public string CssClass { get; set; }
    Property Value
    Type Description
    System.String

    The default value is ""

    CustomTemplate

    This property is used to customize the display text of the selected items in the Dropdown Tree. The given custom template is added to the input instead of the selected item text in the Dropdown Tree when the multi-selection or checkbox support is enabled.

    Declaration
    public string CustomTemplate { get; set; }
    Property Value
    Type Description
    System.String

    The default value is "${value.length} item(s) selected"

    DataBound

    Triggers when data source is populated in the Dropdown Tree.

    Declaration
    public string DataBound { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    DelimiterChar

    Defines the value separator character in the input element when multi-selection or checkbox is enabled in the Dropdown Tree. The delimiter character is applicable only for default and delimiter visibility modes.

    Declaration
    public string DelimiterChar { get; set; }
    Property Value
    Type Description
    System.String

    The default value is ","

    Destroyed

    Triggers when the Dropdown Tree is destroyed successfully.

    Declaration
    public string Destroyed { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    DestroyPopupOnHide

    Specifies whether to destroy the popup or to maintain it in DOM when it is closed. When this property is set to false, then the popup will not be removed from DOM once it is closed.

    Declaration
    public bool DestroyPopupOnHide { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is true

    Enabled

    Specifies a value that indicates whether the Dropdown Tree component is enabled or not.

    Declaration
    public bool Enabled { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is true

    EnableHtmlSanitizer

    Specifies whether to display or remove the untrusted HTML values in the Dropdown Tree component. If 'enableHtmlSanitizer' set to true, the component will sanitize any suspected untrusted strings and scripts before rendering them.

    Declaration
    public bool EnableHtmlSanitizer { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is true

    EnablePersistence

    Enable or disable persisting component's state between page reloads.

    Declaration
    public bool EnablePersistence { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is false

    EnableRtl

    Enable or disable rendering component in right to left direction.

    Declaration
    public bool EnableRtl { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is false

    Fields

    Specifies the data source and mapping fields to render Dropdown Tree items.

    Declaration
    public DropDownTreeFields Fields { get; set; }
    Property Value
    Type Description
    DropDownTreeFields

    The default value is null

    FilterBarPlaceholder

    Accepts the value to be displayed as a watermark text on the filter bar.

    Declaration
    public string FilterBarPlaceholder { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    Filtering

    Triggers on typing a character in the filter bar when the allowFiltering is enabled.

    Declaration
    public string Filtering { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    FilterType

    Determines on which filter type, the component needs to be considered on search action. The TreeFilterType and its supported data types are,

    Declaration
    public TreeFilterType FilterType { get; set; }
    Property Value
    Type Description
    TreeFilterType

    The default value is TreeFilterType.StartsWith

    FloatLabelType

    Specifies whether to display the floating label above the input element. Possible values are: Never: The label will never float in the input when the placeholder is available. Always: The floating label will always float above the input. Auto: The floating label will float above the input after focusing or entering a value in the input.

    Declaration
    public object FloatLabelType { get; set; }
    Property Value
    Type Description
    System.Object

    The default value is Syncfusion.EJ2.Inputs.FloatLabelType.Never

    Focus

    Triggers when the Dropdown Tree input element is focused.

    Declaration
    public string Focus { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    FooterTemplate

    Declaration
    public string FooterTemplate { get; set; }
    Property Value
    Type
    System.String

    For

    Declaration
    public override ModelExpression For { get; set; }
    Property Value
    Type
    Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExpression
    Overrides
    Syncfusion.EJ2.EJTagHelper.For

    HeaderTemplate

    Declaration
    public string HeaderTemplate { get; set; }
    Property Value
    Type
    System.String

    HtmlAttributes

    Allows additional HTML attributes such as title, name, etc., and accepts n number of attributes in a key-value pair format.

    Declaration
    public object HtmlAttributes { get; set; }
    Property Value
    Type Description
    System.Object

    The default value is null

    IgnoreAccent

    When ignoreAccent is set to true, then it ignores the diacritic characters or accents when filtering.

    Declaration
    public bool IgnoreAccent { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is null

    IgnoreCase

    When set to false, consider the case-sensitive on performing the search to find suggestions. By default, consider the casing.

    Declaration
    public bool IgnoreCase { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is true

    ItemTemplate

    Specifies a template to render customized content for all the items. If the itemTemplate property is set, the template content overrides the displayed item text. The property accepts template string or HTML element ID holding the content.

    Declaration
    public string ItemTemplate { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    KeyPress

    Triggers when key press is successful. It helps to customize the operations at key press.

    Declaration
    public string KeyPress { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    Locale

    Overrides the global culture and localization value for this component. Default global culture is 'en-US'.

    Declaration
    public string Locale { get; set; }
    Property Value
    Type Description
    System.String

    The default value is ""

    Mode

    Configures visibility mode for component interaction when allowMultiSelection or checkbox is enabled. Different modes are: Box : Selected items will be visualized in chip. Delimiter : Selected items will be visualized in the text content. Default : On focus in component will act in the box mode. On blur component will act in the delimiter mode. Custom : Selected items will be visualized with the given custom template value. The given custom template is added to the input instead of the selected item text in the Dropdown Tree when the multi-selection or checkbox support is enabled.

    Declaration
    public Mode Mode { get; set; }
    Property Value
    Type Description
    Mode

    The default value is null

    NoRecordsTemplate

    Specifies the template that renders a customized pop-up list content when there is no data available to be displayed within the pop-up.

    Declaration
    public string NoRecordsTemplate { get; set; }
    Property Value
    Type Description
    System.String

    The default value is "No Records Found"

    Open

    Fires when popup opens after animation completion.

    Declaration
    public string Open { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    Placeholder

    Specifies a short hint that describes the expected value of the Dropdown Tree component.

    Declaration
    public string Placeholder { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    PopupHeight

    Specifies the height of the pop-up list.

    Declaration
    public string PopupHeight { get; set; }
    Property Value
    Type Description
    System.String

    The default value is "300px"

    PopupWidth

    Specifies the width of the popup list. By default, the popup width sets based on the width of the Dropdown Tree element.

    Declaration
    public string PopupWidth { get; set; }
    Property Value
    Type Description
    System.String

    The default value is "100%"

    Readonly

    When set to true, the user interactions on the component will be disabled.

    Declaration
    public bool Readonly { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is false

    Select

    Triggers when an item in the popup is selected by the user either with mouse/tap or with keyboard navigation.

    Declaration
    public string Select { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    SelectAllText

    Specifies the display text for the selectAll checkbox in the pop-up.

    Declaration
    public string SelectAllText { get; set; }
    Property Value
    Type Description
    System.String

    The default value is "Select All"

    ShowCheckBox

    Enables or disables the checkbox option in the Dropdown Tree component. If enabled, the Checkbox will be displayed next to the expand or collapse icon of the tree items.

    Declaration
    public bool ShowCheckBox { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is false

    ShowClearButton

    Declaration
    public bool ShowClearButton { get; set; }
    Property Value
    Type
    System.Boolean

    ShowDropDownIcon

    Specifies whether to show or hide the Dropdown button.

    Declaration
    public bool ShowDropDownIcon { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is true

    ShowSelectAll

    Specifies whether to show or hide the selectAll checkbox in the pop-up which allows you to select all the items in the pop-up.

    Declaration
    public bool ShowSelectAll { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is false

    SortOrder

    Specifies a value that indicates whether the items are sorted in the ascending or descending order, or not sorted at all. The available types of sort order are, None - The items are not sorted. Ascending - The items are sorted in the ascending order. Descending - The items are sorted in the descending order.

    Declaration
    public SortOrder SortOrder { get; set; }
    Property Value
    Type Description
    SortOrder

    The default value is SortOrder.None

    Text

    Gets or sets the display text of the selected item which maps the data text field in the component.

    Declaration
    public string Text { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    TreeSettings

    Configures the pop-up tree settings.

    Declaration
    public DropDownTreeTreeSettings TreeSettings { get; set; }
    Property Value
    Type Description
    DropDownTreeTreeSettings

    The default value is null

    UnSelectAllText

    Specifies the display text for the unselect all checkbox in the pop-up.

    Declaration
    public string UnSelectAllText { get; set; }
    Property Value
    Type Description
    System.String

    The default value is "Unselect All"

    Value

    Gets or sets the value of selected item(s) which maps the data value field in the component.

    Declaration
    public object Value { get; set; }
    Property Value
    Type Description
    System.Object

    The default value is null

    ValueTemplate

    Specifies the way to customize the selected values in the Dropdown Tree component based on application needs. If the valueTemplate property is set, the template content overrides the displayed item text. The property accepts [template string] (https://ej2.syncfusion.com/documentation/common/template-engine/) or HTML element ID holding the content. The context for the valueTemplate comes from the data object passed to it.

    Declaration
    public string ValueTemplate { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    Width

    Specifies the width of the component. By default, the component width sets based on the width of its parent container. You can also set the width in pixel values.

    Declaration
    public string Width { get; set; }
    Property Value
    Type Description
    System.String

    The default value is "100%"

    WrapText

    Defines whether to enable or disable the feature called wrap the selected items into multiple lines when the selected item's text content exceeded the input width limit.

    Declaration
    public bool WrapText { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is false

    ZIndex

    Specifies the z-index value of the pop-up element.

    Declaration
    public double ZIndex { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is 1000

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved