Class ListBox
Inheritance
Namespace: Syncfusion.EJ2.DropDowns
Assembly: Syncfusion.EJ2.dll
Syntax
public class ListBox : EJTagHelper
Constructors
ListBox()
Declaration
public ListBox()
Properties
ActionBegin
Triggers before fetching data from the remote server.
Declaration
public string ActionBegin { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
ActionComplete
Triggers after data is fetched successfully from the remote server.
Declaration
public string ActionComplete { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
ActionFailure
Triggers when the data fetch request from the remote server fails.
Declaration
public string ActionFailure { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
AllowDragAndDrop
If 'allowDragAndDrop' is set to true, then you can perform drag and drop of the list item. ListBox contains same 'scope' property enables drag and drop between multiple ListBox.
Declaration
public bool AllowDragAndDrop { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is false |
AllowFiltering
To enable the filtering option in this component.
Filter action performs when type in search box and collect the matched item through filtering
event.
If searching character does not match, noRecordsTemplate
property value will be shown.
Declaration
public bool AllowFiltering { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is false |
BeforeDrop
Triggers before dropping the list item on another list item.
Declaration
public string BeforeDrop { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
BeforeItemRender
Triggers while rendering each list item.
Declaration
public string BeforeItemRender { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
Change
Triggers while select / unselect the list item.
Declaration
public string Change { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
Created
Triggers when the component is created.
Declaration
public string Created { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
CssClass
Sets the CSS classes to root element of this component, which helps to customize the complete styles.
Declaration
public string CssClass { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "" |
DataBound
Triggers when data source is populated in the list.
Declaration
public string DataBound { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
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 object DataSource { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The default value is null |
Destroyed
Triggers when the component is destroyed.
Declaration
public string Destroyed { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
Drag
Triggers while dragging the list item.
Declaration
public string Drag { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
DragStart
Triggers after dragging the list item.
Declaration
public string DragStart { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
Drop
Triggers before dropping the list item on another list item.
Declaration
public string Drop { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
Enabled
Specifies a value that indicates whether the component is enabled or not.
Declaration
public bool Enabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is true |
EnablePersistence
Enable or disable persisting component's state between page reloads. If enabled, following list of states will be persisted.
- value
Declaration
public bool EnablePersistence { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is false |
EnableRtl
Enable or disable rendering component in right to left direction.
Declaration
public bool EnableRtl { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is false |
Fields
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 ListBoxFieldSettings Fields { get; set; }
Property Value
Type | Description |
---|---|
ListBoxFieldSettings | The default value is null |
FilterBarPlaceholder
Accepts the value to be displayed as a watermark text on the filter bar.
Declaration
public string FilterBarPlaceholder { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
Filtering
Triggers on typing a character in the component.
Declaration
public string Filtering { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
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 FilterType FilterType { get; set; }
Property Value
Type | Description |
---|---|
FilterType | The default value is FilterType.StartsWith |
For
Declaration
public override ModelExpression For { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExpression |
Overrides
Height
Sets the height of the ListBox component.
Declaration
public string Height { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "" |
HtmlAttributes
Allows additional HTML attributes such as title, name, etc., and accepts n number of attributes in a key-value pair format.
Declaration
public object HtmlAttributes { get; set; }
Property Value
Type |
---|
System.Object |
ItemTemplate
Accepts the template design and assigns it to each list item present in the popup.
We have built-in template engine
Declaration
public string ItemTemplate { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
Locale
Overrides the global culture and localization value for this component. Default global culture is 'en-US'.
Declaration
public string Locale { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "en-US" |
MaximumSelectionLength
Sets limitation to the value selection. based on the limitation, list selection will be prevented.
Declaration
public double MaximumSelectionLength { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is 1000 |
NoRecordsTemplate
Accepts the template design and assigns it to popup list of component when no data is available on the component.
Declaration
public string NoRecordsTemplate { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "No records found" |
Query
Accepts the external Query
which will execute along with the data processing.
Declaration
public string Query { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
Scope
Defines the scope value to group sets of draggable and droppable ListBox. A draggable with the same scope value will be accepted by the droppable.
Declaration
public string Scope { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "" |
Select
Triggers when an item in the popup is selected by the user either with mouse/tap or with keyboard navigation.
Declaration
public string Select { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
SelectionSettings
Specifies the selection mode and its type.
Declaration
public ListBoxSelectionSettings SelectionSettings { get; set; }
Property Value
Type | Description |
---|---|
ListBoxSelectionSettings | The default value is null |
SortOrder
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 object SortOrder { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The default value is null |
ToolbarSettings
Specifies the toolbar items and its position.
Declaration
public ListBoxToolbarSettings ToolbarSettings { get; set; }
Property Value
Type | Description |
---|---|
ListBoxToolbarSettings | The default value is null |
Value
Sets the specified item to the selected state or gets the selected item in the ListBox.
Declaration
public object Value { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The default value is null |