Blazor

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfDropDownBase<T>

    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
    SfBaseComponent
    SfDataBoundComponent
    SfDropDownBase<T>
    SfDropDownList<TValue, TItem>
    SfListBox<TValue, TItem>
    SfMention<TItem>
    SfMultiSelect<TValue, TItem>
    Inherited Members
    SfDataBoundComponent.SetDataManager<T>(Object)
    SfDataBoundComponent.OnInitializedAsync()
    SfDataBoundComponent.OnParametersSetAsync()
    SfDataBoundComponent.OnAfterRenderAsync(Boolean)
    SfDataBoundComponent.DataManager
    SfDataBoundComponent.MainParent
    SfBaseComponent.Dispose()
    SfBaseComponent.OnObservableChange(String, Object, Boolean, NotifyCollectionChangedEventArgs)
    Namespace: Syncfusion.Blazor.DropDowns
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class SfDropDownBase<T> : SfDataBoundComponent
    Type Parameters
    Name Description
    T

    Specifies the type of SfDropDownBase.

    Constructors

    SfDropDownBase()

    Declaration
    public SfDropDownBase()

    Fields

    reflectionHelper

    Declaration
    protected ReflectionHelper<T> reflectionHelper
    Field Value
    Type Description
    Syncfusion.Blazor.ReflectionHelper<T>

    Properties

    ActionFailureTemplate

    Gets or sets 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

    The template content. The default value is null.

    DataSource

    Gets or sets 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>

    Binding data to the popup element. The default value is null.

    DropDownsEditContext

    Gets or sets the edit context of dropdown base.

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

    DuplicateQuery

    Declaration
    protected Query DuplicateQuery { get; set; }
    Property Value
    Type Description
    Query

    FilterType

    Gets or sets which filter type, the component needs to be considered on search action.

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

    The filter type specifed for searching the list items. The default value is FilterType.StartsWith.

    GroupTemplate

    Gets or sets 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>>

    The template content. The default value is null.

    IgnoreAccent

    Gets or sets whether diacritic characters or accents are ignored.

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

    true, ignores the diacritic characters or accents when filtering. The default value is false.

    IgnoreCase

    Gets or sets whether case-sensitivity is enabled or disabled when searching for suggestions.

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

    false, consider the case-sensitive on performing the search to find suggestions. The default value is true.

    ItemTemplate

    Gets or sets 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>

    The template content. The default value is null.

    NoRecordsTemplate

    Gets or sets 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

    The template content. The default value is null.

    Query

    Gets or sets the external Query that execute along with data processing.

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

    Query value to be used for data fetching. The default value is null.

    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

    The order of sorting the list items. The default value is SortOrder.None.

    ZIndex

    Gets or sets the z-index value of the component popup element.

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

    The ZIndex value for the popup element.The default value is 1000.

    Methods

    ActionComplete(IEnumerable<T>, Query)

    Task which specifies the action complete.

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

    Specifies the data source.

    Query query

    Specifies the query.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Task.

    ActionFailure(Object)

    Task which specifies the action failure.

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

    Specifies the object arguments.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Task.

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

    Add new items to the popup list. By default, new items append to the list as the last item, but you can insert based on the index parameter.

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

    Specifies the items append 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)

    Method which clones the query.

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

    Specifies the query.

    Returns
    Type Description
    Query

    Query.

    Dispose(Boolean)

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing
    Overrides
    SfBaseComponent.Dispose(Boolean)

    GetGroupedDataSource(IEnumerable<T>, SortOrder)

    Declaration
    protected Task<IEnumerable<ListOptions<T>>> GetGroupedDataSource(IEnumerable<T> dataSource, SortOrder sortOrder)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> dataSource
    SortOrder sortOrder
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<ListOptions<T>>>

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

    Method which inserts the item.

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

    Specifies the items.

    System.Nullable<System.Int32> itemIndex

    Specifies the item index.

    System.Boolean preventInit

    Specifies whether it preventInit or not.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Task.

    IsFilter()

    Method specifies whether filter mode or not.

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

    bool.

    IsSimpleDataType()

    Method speciifes whether the data is simple data type.

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

    Bool.

    ListItemCreated(ListOptions<T>)

    Triggers while the list item get created.

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

    Specifies the list item.

    Returns
    Type Description
    ListOptions<T>

    ListOptions.

    SetFields()

    Method which sets the fields.

    Declaration
    protected void SetFields()

    SetItemValue(String, Type)

    Method which set item value.

    Declaration
    protected T SetItemValue(string itemValue, Type valueType = null)
    Parameters
    Type Name Description
    System.String itemValue

    Specifies the item value.

    System.Type valueType
    Returns
    Type Description
    T

    Type.

    SimpleDataExecute(IEnumerable<T>, Query)

    Specifies the data execute.

    Declaration
    protected IEnumerable<T> SimpleDataExecute(IEnumerable<T> data, Query query)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> data

    Specifies the data.

    Query query

    Specifies the query.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<T>

    Simple data.

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