Blazor

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfDropDownBase<T> - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SfDropDownBase<T>

    The DropDownBase can be created data source and fetch the list of data from data bound component.

    Inheritance
    System.Object
    Syncfusion.Blazor.SfBaseComponent
    SfDataBoundComponent
    SfDropDownBase<T>
    SfDropDownList<TValue, TItem>
    SfListBox<TValue, TItem>
    SfMultiSelect<TValue, TItem>
    Inherited Members
    SfDataBoundComponent.SetDataManager<T>(Object)
    SfDataBoundComponent.OnAfterRenderAsync(Boolean)
    SfDataBoundComponent.DataManager
    SfDataBoundComponent.MainParent
    Namespace: Syncfusion.Blazor.DropDowns
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class SfDropDownBase<T> : SfDataBoundComponent
    Type Parameters
    Name Description
    T

    Constructors

    SfDropDownBase()

    Declaration
    public SfDropDownBase()

    Properties

    ActionFailureTemplate

    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 RenderFragment ActionFailureTemplate { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.RenderFragment

    ComponentName

    Declaration
    protected virtual string ComponentName { get; set; }
    Property Value
    Type Description
    System.String

    DataSource

    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 IEnumerable<T> DataSource { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<T>

    DropDownsEditContext

    Declaration
    protected EditContext DropDownsEditContext { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.Forms.EditContext

    Enabled

    Specifies a boolean value that indicates whether the component allows the user to interact with it.

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

    EnablePersistence

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

    If enabled, the `Value` state will be persisted.

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

    FilterType

    Determines on which filter type, the component needs to be considered on search action.

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

    GroupTemplate

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

    Declaration
    public RenderFragment<ComposedItemModel<T>> GroupTemplate { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.RenderFragment<Syncfusion.Blazor.DropDowns.ComposedItemModel<T>>

    IgnoreAccent

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

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

    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

    IsActionFaiure

    Declaration
    protected bool IsActionFaiure { get; set; }
    Property Value
    Type Description
    System.Boolean

    ItemData

    Declaration
    protected T ItemData { get; set; }
    Property Value
    Type Description
    T

    ItemTemplate

    Accepts the template design and assigns it to each list item present in the popup.

    Declaration
    public RenderFragment<T> ItemTemplate { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.RenderFragment<T>

    ListData

    Declaration
    protected IEnumerable<T> ListData { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<T>

    ListDataSource

    Declaration
    protected IEnumerable<ListOptions<T>> ListDataSource { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<ListOptions<T>>

    Locale

    Specifies the global culture and localization of this component.

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

    MainData

    Declaration
    protected IEnumerable<T> MainData { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<T>

    NoRecordsTemplate

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

    Declaration
    public RenderFragment NoRecordsTemplate { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.RenderFragment

    Query

    Accepts the external Query that execute along with data processing.

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

    SortOrder

    Specifies the `SortOrder` to sort the data source.

    The available type of sort orders are

    • NoneThe data source is not sorting.
    • AscendingThe data source is sorting with ascending order.
    • DescendingThe data source is sorting with descending order.
    Declaration
    public SortOrder SortOrder { get; set; }
    Property Value
    Type Description
    SortOrder

    ZIndex

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

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

    Methods

    ActionBegin(IEnumerable<T>, Query)

    Declaration
    protected virtual Task<ActionBeginEventArgs> ActionBegin(IEnumerable<T> dataSource, Query query = null)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> dataSource
    Query query
    Returns
    Type Description
    System.Threading.Tasks.Task<ActionBeginEventArgs>

    ActionComplete(IEnumerable<T>, Query)

    Declaration
    protected virtual Task ActionComplete(IEnumerable<T> dataSource, Query query = null)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> dataSource
    Query query
    Returns
    Type Description
    System.Threading.Tasks.Task

    ActionFailure(Object)

    Declaration
    protected virtual Task ActionFailure(object args)
    Parameters
    Type Name Description
    System.Object args
    Returns
    Type Description
    System.Threading.Tasks.Task

    AddItem(IEnumerable<T>, Nullable<Int32>)

    Adds a new item to the popup list. By default, new item appends to the list as the last item, but you can insert based on the index parameter.

    Declaration
    public Task AddItem(IEnumerable<T> items, Nullable<int> itemIndex = null)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> items

    Specifies the item appends to the list based on index.

    System.Nullable<System.Int32> itemIndex

    Specifies the index to place the newly added item in the popup list.

    Returns
    Type Description
    System.Threading.Tasks.Task

    CloneQuery(Query)

    Declaration
    protected Query CloneQuery(Query query)
    Parameters
    Type Name Description
    Query query
    Returns
    Type Description
    Query

    GetDataByText(String)

    Declaration
    protected T GetDataByText(string ddlText)
    Parameters
    Type Name Description
    System.String ddlText
    Returns
    Type Description
    T

    GetQuery(Query)

    Declaration
    protected virtual Query GetQuery(Query query)
    Parameters
    Type Name Description
    Query query
    Returns
    Type Description
    Query

    HighlightSearch(String, String, Boolean, FilterType)

    Declaration
    protected string HighlightSearch(string liConent, string searchText, bool ignoreCase, FilterType highlightType)
    Parameters
    Type Name Description
    System.String liConent
    System.String searchText
    System.Boolean ignoreCase
    FilterType highlightType
    Returns
    Type Description
    System.String

    IncrementalSearch(String, IEnumerable<T>, Nullable<Int32>, Boolean)

    Declaration
    protected T IncrementalSearch(string queryString, IEnumerable<T> items, Nullable<int> selectedIndex, bool ignoreCase)
    Parameters
    Type Name Description
    System.String queryString
    System.Collections.Generic.IEnumerable<T> items
    System.Nullable<System.Int32> selectedIndex
    System.Boolean ignoreCase
    Returns
    Type Description
    T

    InsertItem(IEnumerable<T>, Nullable<Int32>, Boolean)

    Declaration
    protected Task InsertItem(IEnumerable<T> items, Nullable<int> itemIndex = null, bool preventInit = false)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> items
    System.Nullable<System.Int32> itemIndex
    System.Boolean preventInit
    Returns
    Type Description
    System.Threading.Tasks.Task

    IsFilter()

    Declaration
    protected virtual bool IsFilter()
    Returns
    Type Description
    System.Boolean

    IsSimpleDataType()

    Declaration
    protected bool IsSimpleDataType()
    Returns
    Type Description
    System.Boolean

    ListItemCreated(ListOptions<T>)

    Declaration
    protected virtual ListOptions<T> ListItemCreated(ListOptions<T> listItem)
    Parameters
    Type Name Description
    ListOptions<T> listItem
    Returns
    Type Description
    ListOptions<T>

    OnInitializedAsync()

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    SfDataBoundComponent.OnInitializedAsync()

    OnParametersSetAsync()

    Declaration
    protected override Task OnParametersSetAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    SfDataBoundComponent.OnParametersSetAsync()

    Render(IEnumerable<T>, FieldSettingsModel, Query)

    Declaration
    protected Task Render(IEnumerable<T> dataSource, FieldSettingsModel fields, Query query)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> dataSource
    FieldSettingsModel fields
    Query query
    Returns
    Type Description
    System.Threading.Tasks.Task

    RenderItems()

    Declaration
    protected Task RenderItems()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Search(String, IEnumerable<T>, String, Boolean)

    Declaration
    protected T Search(string inputValue, IEnumerable<T> items, string searchType, bool ignoreCase)
    Parameters
    Type Name Description
    System.String inputValue
    System.Collections.Generic.IEnumerable<T> items
    System.String searchType
    System.Boolean ignoreCase
    Returns
    Type Description
    T

    SetFields()

    Declaration
    protected void SetFields()

    SetItemValue(String)

    Declaration
    protected T SetItemValue(string itemValue)
    Parameters
    Type Name Description
    System.String itemValue
    Returns
    Type Description
    T

    SetListData(IEnumerable<T>, FieldSettingsModel, Query)

    Declaration
    protected Task SetListData(IEnumerable<T> dataSource, FieldSettingsModel fields, Query query)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> dataSource
    FieldSettingsModel fields
    Query query
    Returns
    Type Description
    System.Threading.Tasks.Task

    SimpleDataExecute(IEnumerable<T>, Query)

    Declaration
    protected IEnumerable<T> SimpleDataExecute(IEnumerable<T> data, Query query)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> data
    Query query
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<T>
    Back to top Generated by DocFX
    Copyright © 2001 - 2021 Syncfusion Inc. All Rights Reserved