Class SfDropDownBase<T>
The DropDownBase can be created data source and fetch the list of data from data bound component.
Inheritance
Inherited Members
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()
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 |
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 |
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 |
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 |
IgnoreAccent
Gets or sets whether diacritic characters or accents are ignored.
Declaration
public bool IgnoreAccent { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
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 |
|
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 |
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 |
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 |
reflectionHelper
Declaration
protected ReflectionHelper reflectionHelper { get; set; }
Property Value
Type | Description |
---|---|
Syncfusion.Blazor.ReflectionHelper |
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 |
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 |
Methods
ActionCompleteAsync(IEnumerable<T>, Query)
Task which specifies the action complete.
Declaration
protected virtual Task ActionCompleteAsync(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. |
ActionFailureAsync(Object)
Task which specifies the action failure.
Declaration
protected virtual Task ActionFailureAsync(object arguments)
Parameters
Type | Name | Description |
---|---|---|
System.Object | arguments | 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
ExecuteSimpleQuery(IEnumerable<T>, Query)
Specifies the data execute.
Declaration
protected IEnumerable<T> ExecuteSimpleQuery(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. |
GetGroupedDataSourceAsync(IEnumerable<T>, SortOrder)
Declaration
protected Task<IEnumerable<ListOptions<T>>> GetGroupedDataSourceAsync(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>>> |
InsertItemAsync(IEnumerable<T>, Nullable<Int32>, Boolean)
Method which inserts the item.
Declaration
protected Task InsertItemAsync(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. |
IsFilterMode()
Method specifies whether filter mode or not.
Declaration
protected virtual bool IsFilterMode()
Returns
Type | Description |
---|---|
System.Boolean | bool. |
IsPrimitiveDataType()
Method speciifes whether the data is simple data type.
Declaration
protected bool IsPrimitiveDataType()
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. |