Class SfDropDownBase<T>
The DropDownBase can be created data source and fetch the list of data from data bound component.
Inheritance
System.Object
SfDropDownBase<T>
Assembly: Syncfusion.Blazor.dll
Syntax
public class SfDropDownBase<T> : SfDataBoundComponent
Type Parameters
Name |
Description |
T |
Specifies the type of SfDropDownBase.
|
Constructors
SfDropDownBase()
Declaration
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 |
Microsoft.AspNetCore.Components.Forms.EditContext |
DuplicateQuery
Declaration
protected Query DuplicateQuery { get; set; }
Property Value
FilterDataSource
Declaration
protected IEnumerable<T> FilterDataSource { get; set; }
Property Value
Type |
System.Collections.Generic.IEnumerable<T> |
FilterQuery
Declaration
protected Query FilterQuery { get; set; }
Property Value
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 .
|
GeneratedData
Declaration
protected Dictionary<int, IEnumerable<object>> GeneratedData { get; set; }
Property Value
Type |
System.Collections.Generic.Dictionary<System.Int32, System.Collections.Generic.IEnumerable<System.Object>> |
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 .
|
IncrementalEndIndex
Declaration
protected int IncrementalEndIndex { get; set; }
Property Value
IncrementalSearchIndex
Declaration
protected int IncrementalSearchIndex { get; set; }
Property Value
IncrementalStartIndex
Declaration
protected int IncrementalStartIndex { get; set; }
Property Value
IsCustomFilteringAction
Declaration
protected bool IsCustomFilteringAction { get; set; }
Property Value
IsEntireDataUpdated
Declaration
protected bool IsEntireDataUpdated { get; set; }
Property Value
IsExecuteQueryCalled
Declaration
protected bool IsExecuteQueryCalled { get; set; }
Property Value
IsMultiSelect
Declaration
protected bool IsMultiSelect { get; set; }
Property Value
IsReOrderData
Declaration
protected bool IsReOrderData { get; set; }
Property Value
IsVirtualizationEnabled
Declaration
protected bool IsVirtualizationEnabled { get; set; }
Property Value
IsVirtualSelectAll
Declaration
protected bool IsVirtualSelectAll { get; set; }
Property Value
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 .
|
ListHeight
Declaration
protected int ListHeight { get; set; }
Property Value
ListItemsCount
Declaration
protected int ListItemsCount { get; set; }
Property Value
ListVirtualData
Declaration
protected VirtualListData ListVirtualData { get; set; }
Property Value
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 .
|
PreviousFocusData
Declaration
protected T PreviousFocusData { get; set; }
Property Value
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 .
|
reflectionHelper
Declaration
protected ReflectionHelper reflectionHelper { get; set; }
Property Value
Type |
Syncfusion.Blazor.ReflectionHelper |
ReOrderData
Declaration
protected IEnumerable<ListOptions<T>> ReOrderData { get; set; }
Property Value
Type |
System.Collections.Generic.IEnumerable<ListOptions<T>> |
Declaration
protected VirtualAction ScrollActions { get; set; }
Property Value
Type |
Syncfusion.Blazor.DropDowns.VirtualAction |
SelectedValueAction
Declaration
protected VirtualAction SelectedValueAction { get; set; }
Property Value
Type |
Syncfusion.Blazor.DropDowns.VirtualAction |
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 .
|
VirtualCustomData
Declaration
protected T VirtualCustomData { get; set; }
Property Value
VirtualGroupDataSource
Declaration
protected IEnumerable<T> VirtualGroupDataSource { get; set; }
Property Value
Type |
System.Collections.Generic.IEnumerable<T> |
VirtualItemEndIndex
Declaration
protected int VirtualItemEndIndex { get; set; }
Property Value
VirtualItemStartIndex
Declaration
protected int VirtualItemStartIndex { get; set; }
Property Value
VirtualListHeight
Declaration
protected int VirtualListHeight { get; set; }
Property Value
VirtualSelectAllDataSource
Declaration
protected IEnumerable<ListOptions<T>> VirtualSelectAllDataSource { get; set; }
Property Value
Type |
System.Collections.Generic.IEnumerable<ListOptions<T>> |
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
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 |
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.
|
DataProcessAsync(VirtualAction, Boolean)
Declaration
protected Task DataProcessAsync(VirtualAction action = null, bool isOpenPopup = false)
Parameters
Type |
Name |
Description |
Syncfusion.Blazor.DropDowns.VirtualAction |
action |
|
System.Boolean |
isOpenPopup |
|
Returns
Type |
System.Threading.Tasks.Task |
DisableListItem(ListOptions<T>)
Update the disable class and disable attributes in a ListOptions object.
Declaration
protected void DisableListItem(ListOptions<T> disableItem)
Parameters
Type |
Name |
Description |
ListOptions<T> |
disableItem |
The ListOptions object that represents the list item to be disabled.
|
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
Type |
Name |
Description |
System.Boolean |
disposing |
|
Overrides
ExecuteSimpleQuery(IEnumerable<T>, Query, Boolean)
Specifies the data execute.
Declaration
protected IEnumerable<T> ExecuteSimpleQuery(IEnumerable<T> data, Query query, bool isUpdateCount = false)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<T> |
data |
Specifies the data.
|
Query |
query |
Specifies the query.
|
System.Boolean |
isUpdateCount |
Specifies to update dataCount.
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<T> |
Simple data.
|
GenerateAndExecuteQueryAsync(Query, Int32, Int32)
Declaration
protected Task GenerateAndExecuteQueryAsync(Query query, int virtualItemStartIndex = 0, int virtualItemEndIndex = 0)
Parameters
Type |
Name |
Description |
Query |
query |
|
System.Int32 |
virtualItemStartIndex |
|
System.Int32 |
virtualItemEndIndex |
|
Returns
Type |
System.Threading.Tasks.Task |
GetDataSourceAsync(IEnumerable<T>, Query)
Declaration
protected Task<IEnumerable<ListOptions<T>>> GetDataSourceAsync(IEnumerable<T> dataSource, Query query)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<T> |
dataSource |
|
Query |
query |
|
Returns
Type |
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<ListOptions<T>>> |
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 |
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<ListOptions<T>>> |
GetSkeletonCount(Boolean)
Declaration
protected void GetSkeletonCount(bool RetainSkeleton = false)
Parameters
Type |
Name |
Description |
System.Boolean |
RetainSkeleton |
|
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.
|
IsDisable(T)
Determines whether the list item is disabled based on the 'Disabled' field.
Declaration
protected bool IsDisable(T listItem)
Parameters
Type |
Name |
Description |
T |
listItem |
The list item of type ListOptions<T>.
|
Returns
Type |
Description |
System.Boolean |
Returns true if the 'Disabled' field of the list item is true, otherwise false.
If the 'Disabled' field is a string, it tries to parse it to a boolean value.
|
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.
|
IsVirtualization(Boolean, Boolean, Boolean, Boolean)
Declaration
protected virtual void IsVirtualization(bool isVirtualization, bool isAllowFiltering, bool isDropDown, bool deviceSpecific)
Parameters
Type |
Name |
Description |
System.Boolean |
isVirtualization |
|
System.Boolean |
isAllowFiltering |
|
System.Boolean |
isDropDown |
|
System.Boolean |
deviceSpecific |
|
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
SetCurrentViewDataAsync(Int32, Int32)
Declaration
protected virtual Task SetCurrentViewDataAsync(int virtualItemStartIndex, int virtualItemEndIndex)
Parameters
Type |
Name |
Description |
System.Int32 |
virtualItemStartIndex |
|
System.Int32 |
virtualItemEndIndex |
|
Returns
Type |
System.Threading.Tasks.Task |
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