ASP.NET MVC - EJ2

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class DropDownListBuilder

    Show / Hide Table of Contents

    Class DropDownListBuilder

    Inheritance
    System.Object
    ControlBuilder
    DropDownListBuilder
    Inherited Members
    ControlBuilder.Context
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.EJ2.DropDowns
    Assembly: Syncfusion.EJ2.dll
    Syntax
    public class DropDownListBuilder : ControlBuilder

    Constructors

    DropDownListBuilder()

    Declaration
    public DropDownListBuilder()

    DropDownListBuilder(DropDownList)

    Declaration
    public DropDownListBuilder(DropDownList model)
    Parameters
    Type Name Description
    DropDownList model

    Fields

    model

    Declaration
    public DropDownList model
    Field Value
    Type Description
    DropDownList

    Properties

    HtmlAttr

    Declaration
    public IDictionary<string, object> HtmlAttr { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IDictionary<System.String, System.Object>

    ID

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

    Output

    Declaration
    public override TextWriter Output { get; set; }
    Property Value
    Type Description
    System.IO.TextWriter
    Overrides
    ControlBuilder.Output

    Methods

    ActionBegin(String)

    Triggers before fetching data from the remote server.

    Declaration
    public DropDownListBuilder ActionBegin(string actionBegin)
    Parameters
    Type Name Description
    System.String actionBegin
    Returns
    Type Description
    DropDownListBuilder

    ActionComplete(String)

    Triggers after data is fetched successfully from the remote server.

    Declaration
    public DropDownListBuilder ActionComplete(string actionComplete)
    Parameters
    Type Name Description
    System.String actionComplete
    Returns
    Type Description
    DropDownListBuilder

    ActionFailure(String)

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

    Declaration
    public DropDownListBuilder ActionFailure(string actionFailure)
    Parameters
    Type Name Description
    System.String actionFailure
    Returns
    Type Description
    DropDownListBuilder

    ActionFailureTemplate(String)

    Accepts the template and assigns it to the popup list content of the component when the data fetch request from the remote server fails.

    Declaration
    public DropDownListBuilder ActionFailureTemplate(string actionFailureTemplate)
    Parameters
    Type Name Description
    System.String actionFailureTemplate
    Returns
    Type Description
    DropDownListBuilder

    AllowFiltering(Boolean)

    When allowFiltering is set to true, show the filter bar (search box) of the component. The filter action retrieves matched items through the filtering event based on the characters typed in the search TextBox.

    Declaration
    public DropDownListBuilder AllowFiltering(bool allowFiltering = true)
    Parameters
    Type Name Description
    System.Boolean allowFiltering
    Returns
    Type Description
    DropDownListBuilder

    BeforeOpen(String)

    Triggers when the popup before opens.

    Declaration
    public DropDownListBuilder BeforeOpen(string beforeOpen)
    Parameters
    Type Name Description
    System.String beforeOpen
    Returns
    Type Description
    DropDownListBuilder

    Blur(String)

    Triggers when focus moves out from the component.

    Declaration
    public DropDownListBuilder Blur(string blur)
    Parameters
    Type Name Description
    System.String blur
    Returns
    Type Description
    DropDownListBuilder

    Change(String)

    Triggers when an item in a popup is selected or when the model value is changed by user. Use change event to Configure the Cascading DropDownList

    Declaration
    public DropDownListBuilder Change(string change)
    Parameters
    Type Name Description
    System.String change
    Returns
    Type Description
    DropDownListBuilder

    Close(String)

    Triggers when the popup is closed.

    Declaration
    public DropDownListBuilder Close(string close)
    Parameters
    Type Name Description
    System.String close
    Returns
    Type Description
    DropDownListBuilder

    Created(String)

    Triggers when the component is created.

    Declaration
    public DropDownListBuilder Created(string created)
    Parameters
    Type Name Description
    System.String created
    Returns
    Type Description
    DropDownListBuilder

    CssClass(String)

    Sets CSS classes to the root element of the component that allows customization of appearance.

    Declaration
    public DropDownListBuilder CssClass(string cssClass)
    Parameters
    Type Name Description
    System.String cssClass
    Returns
    Type Description
    DropDownListBuilder

    DataBound(String)

    Triggers when data source is populated in the popup list..

    Declaration
    public DropDownListBuilder DataBound(string dataBound)
    Parameters
    Type Name Description
    System.String dataBound
    Returns
    Type Description
    DropDownListBuilder

    DataSource(Action<DataManagerBuilder>)

    Declaration
    public DropDownListBuilder DataSource(Action<DataManagerBuilder> dataSource)
    Parameters
    Type Name Description
    System.Action<DataManagerBuilder> dataSource
    Returns
    Type Description
    DropDownListBuilder

    DataSource(Double[])

    Accepts the list items either through local or remote service and binds it to the component. It can be an array of JSON Objects or an instance of DataManager.

    Declaration
    public DropDownListBuilder DataSource(double[] dataSource)
    Parameters
    Type Name Description
    System.Double[] dataSource
    Returns
    Type Description
    DropDownListBuilder

    DataSource(Object)

    Accepts the list items either through local or remote service and binds it to the component. It can be an array of JSON Objects or an instance of DataManager.

    Declaration
    public DropDownListBuilder DataSource(object dataSource)
    Parameters
    Type Name Description
    System.Object dataSource
    Returns
    Type Description
    DropDownListBuilder

    DataSource(String[])

    Accepts the list items either through local or remote service and binds it to the component. It can be an array of JSON Objects or an instance of DataManager.

    Declaration
    public DropDownListBuilder DataSource(string[] dataSource)
    Parameters
    Type Name Description
    System.String[] dataSource
    Returns
    Type Description
    DropDownListBuilder

    Destroyed(String)

    Triggers when the component is destroyed.

    Declaration
    public DropDownListBuilder Destroyed(string destroyed)
    Parameters
    Type Name Description
    System.String destroyed
    Returns
    Type Description
    DropDownListBuilder

    Enabled(Boolean)

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

    Declaration
    public DropDownListBuilder Enabled(bool enabled = true)
    Parameters
    Type Name Description
    System.Boolean enabled
    Returns
    Type Description
    DropDownListBuilder

    EnablePersistence(Boolean)

    Enable or disable persisting component's state between page reloads. If enabled, following list of states will be persisted.

    1. value
    Declaration
    public DropDownListBuilder EnablePersistence(bool enablePersistence = true)
    Parameters
    Type Name Description
    System.Boolean enablePersistence
    Returns
    Type Description
    DropDownListBuilder

    EnableRtl(Boolean)

    Enable or disable rendering component in right to left direction.

    Declaration
    public DropDownListBuilder EnableRtl(bool enableRtl = true)
    Parameters
    Type Name Description
    System.Boolean enableRtl
    Returns
    Type Description
    DropDownListBuilder

    Fields(DropDownListFieldSettings)

    The fields property maps the columns of the data table and binds the data to the component. text - Maps the text column from data table for each list item. value - Maps the value column from data table for each list item. iconCss - Maps the icon class column from data table for each list item. groupBy - Group the list items with it's related items by mapping groupBy field.

    Declaration
    public DropDownListBuilder Fields(DropDownListFieldSettings fields)
    Parameters
    Type Name Description
    DropDownListFieldSettings fields
    Returns
    Type Description
    DropDownListBuilder

    Fields(Action<DropDownListFieldSettingsBuilder>)

    Declaration
    public DropDownListBuilder Fields(Action<DropDownListFieldSettingsBuilder> fields)
    Parameters
    Type Name Description
    System.Action<DropDownListFieldSettingsBuilder> fields
    Returns
    Type Description
    DropDownListBuilder

    FilterBarPlaceholder(String)

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

    Declaration
    public DropDownListBuilder FilterBarPlaceholder(string filterBarPlaceholder)
    Parameters
    Type Name Description
    System.String filterBarPlaceholder
    Returns
    Type Description
    DropDownListBuilder

    Filtering(String)

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

    For more details about the filtering refer to Filtering documentation.

    Declaration
    public DropDownListBuilder Filtering(string filtering)
    Parameters
    Type Name Description
    System.String filtering
    Returns
    Type Description
    DropDownListBuilder

    FilterType(FilterType)

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

    Declaration
    public DropDownListBuilder FilterType(FilterType filterType)
    Parameters
    Type Name Description
    FilterType filterType
    Returns
    Type Description
    DropDownListBuilder

    FloatLabelType(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 DropDownListBuilder FloatLabelType(FloatLabelType floatLabelType)
    Parameters
    Type Name Description
    FloatLabelType floatLabelType
    Returns
    Type Description
    DropDownListBuilder

    Focus(String)

    Triggers when the component is focused.

    Declaration
    public DropDownListBuilder Focus(string focus)
    Parameters
    Type Name Description
    System.String focus
    Returns
    Type Description
    DropDownListBuilder

    FooterTemplate(String)

    Accepts the template design and assigns it to the footer container of the popup list.

    For more details about the available template options refer to Template documentation.

    Declaration
    public DropDownListBuilder FooterTemplate(string footerTemplate)
    Parameters
    Type Name Description
    System.String footerTemplate
    Returns
    Type Description
    DropDownListBuilder

    GroupTemplate(String)

    Accepts the template design and assigns it to the group headers present in the popup list.

    Declaration
    public DropDownListBuilder GroupTemplate(string groupTemplate)
    Parameters
    Type Name Description
    System.String groupTemplate
    Returns
    Type Description
    DropDownListBuilder

    HeaderTemplate(String)

    Accepts the template design and assigns it to the header container of the popup list.

    For more details about the available template options refer to Template documentation.

    Declaration
    public DropDownListBuilder HeaderTemplate(string headerTemplate)
    Parameters
    Type Name Description
    System.String headerTemplate
    Returns
    Type Description
    DropDownListBuilder

    HtmlAttributes(Object)

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

    Declaration
    public DropDownListBuilder HtmlAttributes(object htmlAttributes)
    Parameters
    Type Name Description
    System.Object htmlAttributes
    Returns
    Type Description
    DropDownListBuilder

    IgnoreAccent(Boolean)

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

    Declaration
    public DropDownListBuilder IgnoreAccent(bool ignoreAccent = true)
    Parameters
    Type Name Description
    System.Boolean ignoreAccent
    Returns
    Type Description
    DropDownListBuilder

    IgnoreCase(Boolean)

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

    Declaration
    public DropDownListBuilder IgnoreCase(bool ignoreCase = true)
    Parameters
    Type Name Description
    System.Boolean ignoreCase
    Returns
    Type Description
    DropDownListBuilder

    Index(Double)

    Gets or sets the index of the selected item in the component.

    Declaration
    public DropDownListBuilder Index(double index)
    Parameters
    Type Name Description
    System.Double index
    Returns
    Type Description
    DropDownListBuilder

    ItemTemplate(String)

    Accepts the template design and assigns it to each list item present in the popup. We have built-in template engine

    Declaration
    public DropDownListBuilder ItemTemplate(string itemTemplate)
    Parameters
    Type Name Description
    System.String itemTemplate
    Returns
    Type Description
    DropDownListBuilder

    Locale(String)

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

    Declaration
    public DropDownListBuilder Locale(string locale)
    Parameters
    Type Name Description
    System.String locale
    Returns
    Type Description
    DropDownListBuilder

    NoRecordsTemplate(String)

    Accepts the template design and assigns it to popup list of component when no data is available on the component.

    Declaration
    public DropDownListBuilder NoRecordsTemplate(string noRecordsTemplate)
    Parameters
    Type Name Description
    System.String noRecordsTemplate
    Returns
    Type Description
    DropDownListBuilder

    Open(String)

    Triggers when the popup opens.

    Declaration
    public DropDownListBuilder Open(string open)
    Parameters
    Type Name Description
    System.String open
    Returns
    Type Description
    DropDownListBuilder

    Placeholder(String)

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

    Declaration
    public DropDownListBuilder Placeholder(string placeholder)
    Parameters
    Type Name Description
    System.String placeholder
    Returns
    Type Description
    DropDownListBuilder

    PopupHeight(String)

    Specifies the height of the popup list.

    For more details about the popup configuration refer to Popup Configuration documentation.

    Declaration
    public DropDownListBuilder PopupHeight(string popupHeight)
    Parameters
    Type Name Description
    System.String popupHeight
    Returns
    Type Description
    DropDownListBuilder

    PopupWidth(String)

    Specifies the width of the popup list. By default, the popup width sets based on the width of the component.

    For more details about the popup configuration refer to Popup Configuration documentation.

    Declaration
    public DropDownListBuilder PopupWidth(string popupWidth)
    Parameters
    Type Name Description
    System.String popupWidth
    Returns
    Type Description
    DropDownListBuilder

    Query(String)

    Accepts the external Query that execute along with data processing.

    Declaration
    public DropDownListBuilder Query(string query)
    Parameters
    Type Name Description
    System.String query
    Returns
    Type Description
    DropDownListBuilder

    Readonly(Boolean)

    Declaration
    public DropDownListBuilder Readonly(bool readOnly = true)
    Parameters
    Type Name Description
    System.Boolean readOnly
    Returns
    Type Description
    DropDownListBuilder

    Render()

    Declaration
    public HtmlString Render()
    Returns
    Type Description
    System.Web.HtmlString

    Select(String)

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

    Declaration
    public DropDownListBuilder Select(string select)
    Parameters
    Type Name Description
    System.String select
    Returns
    Type Description
    DropDownListBuilder

    ShowClearButton(Boolean)

    Specifies whether to show or hide the clear button. When the clear button is clicked, value, text, and index properties are reset to null.

    Declaration
    public DropDownListBuilder ShowClearButton(bool showClearButton = true)
    Parameters
    Type Name Description
    System.Boolean showClearButton
    Returns
    Type Description
    DropDownListBuilder

    SortOrder(Object)

    Specifies the sortOrder to sort the data source. The available type of sort orders are None - The data source is not sorting. Ascending - The data source is sorting with ascending order. Descending - The data source is sorting with descending order.

    Declaration
    public DropDownListBuilder SortOrder(object sortOrder)
    Parameters
    Type Name Description
    System.Object sortOrder
    Returns
    Type Description
    DropDownListBuilder

    Text(String)

    Gets or sets the display text of the selected item in the component.

    Declaration
    public DropDownListBuilder Text(string text)
    Parameters
    Type Name Description
    System.String text
    Returns
    Type Description
    DropDownListBuilder

    Value(Boolean)

    Gets or sets the value of the selected item in the component.

    Declaration
    public DropDownListBuilder Value(bool value = true)
    Parameters
    Type Name Description
    System.Boolean value
    Returns
    Type Description
    DropDownListBuilder

    Value(Double)

    Gets or sets the value of the selected item in the component.

    Declaration
    public DropDownListBuilder Value(double value)
    Parameters
    Type Name Description
    System.Double value
    Returns
    Type Description
    DropDownListBuilder

    Value(Object)

    Gets or sets the value of the selected item in the component.

    Declaration
    public DropDownListBuilder Value(object value)
    Parameters
    Type Name Description
    System.Object value
    Returns
    Type Description
    DropDownListBuilder

    Value(String)

    Gets or sets the value of the selected item in the component.

    Declaration
    public DropDownListBuilder Value(string value)
    Parameters
    Type Name Description
    System.String value
    Returns
    Type Description
    DropDownListBuilder

    ValueTemplate(String)

    Accepts the template design and assigns it to the selected list item in the input element of the component. For more details about the available template options refer to Template documentation.

    Declaration
    public DropDownListBuilder ValueTemplate(string valueTemplate)
    Parameters
    Type Name Description
    System.String valueTemplate
    Returns
    Type Description
    DropDownListBuilder

    Width(String)

    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 DropDownListBuilder Width(string width)
    Parameters
    Type Name Description
    System.String width
    Returns
    Type Description
    DropDownListBuilder

    ZIndex(Double)

    specifies the z-index value of the component popup element.

    Declaration
    public DropDownListBuilder ZIndex(double zIndex)
    Parameters
    Type Name Description
    System.Double zIndex
    Returns
    Type Description
    DropDownListBuilder
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved