Class ListBoxBuilder
Inheritance
System.Object
ListBoxBuilder
Assembly: Syncfusion.EJ2.dll
Syntax
public class ListBoxBuilder : ControlBuilder
Constructors
ListBoxBuilder()
Declaration
ListBoxBuilder(ListBox)
Declaration
public ListBoxBuilder(ListBox model)
Parameters
Type |
Name |
Description |
ListBox |
model |
|
Fields
model
Declaration
Field Value
Properties
HtmlAttr
Declaration
public IDictionary<string, object> HtmlAttr { get; set; }
Property Value
Type |
Description |
System.Collections.Generic.IDictionary<System.String, System.Object> |
|
ID
Declaration
public string ID { get; set; }
Property Value
Type |
Description |
System.String |
|
Output
Declaration
public override TextWriter Output { get; set; }
Property Value
Type |
Description |
System.IO.TextWriter |
|
Overrides
Methods
ActionBegin(String)
Triggers before fetching data from the remote server.
Declaration
public ListBoxBuilder ActionBegin(string actionBegin)
Parameters
Type |
Name |
Description |
System.String |
actionBegin |
|
Returns
ActionComplete(String)
Triggers after data is fetched successfully from the remote server.
Declaration
public ListBoxBuilder ActionComplete(string actionComplete)
Parameters
Type |
Name |
Description |
System.String |
actionComplete |
|
Returns
ActionFailure(String)
Triggers when the data fetch request from the remote server fails.
Declaration
public ListBoxBuilder ActionFailure(string actionFailure)
Parameters
Type |
Name |
Description |
System.String |
actionFailure |
|
Returns
AllowDragAndDrop(Boolean)
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 ListBoxBuilder AllowDragAndDrop(bool allowDragAndDrop = true)
Parameters
Type |
Name |
Description |
System.Boolean |
allowDragAndDrop |
|
Returns
AllowFiltering(Boolean)
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 ListBoxBuilder AllowFiltering(bool allowFiltering = true)
Parameters
Type |
Name |
Description |
System.Boolean |
allowFiltering |
|
Returns
BeforeDrop(String)
Triggers before dropping the list item on another list item.
Declaration
public ListBoxBuilder BeforeDrop(string beforeDrop)
Parameters
Type |
Name |
Description |
System.String |
beforeDrop |
|
Returns
BeforeItemRender(String)
Triggers while rendering each list item.
Declaration
public ListBoxBuilder BeforeItemRender(string beforeItemRender)
Parameters
Type |
Name |
Description |
System.String |
beforeItemRender |
|
Returns
Change(String)
Triggers while select / unselect the list item.
Declaration
public ListBoxBuilder Change(string change)
Parameters
Type |
Name |
Description |
System.String |
change |
|
Returns
Created(String)
Triggers when the component is created.
Declaration
public ListBoxBuilder Created(string created)
Parameters
Type |
Name |
Description |
System.String |
created |
|
Returns
CssClass(String)
Sets the CSS classes to root element of this component, which helps to customize the
complete styles.
Declaration
public ListBoxBuilder CssClass(string cssClass)
Parameters
Type |
Name |
Description |
System.String |
cssClass |
|
Returns
DataBound(String)
Triggers when data source is populated in the list.
Declaration
public ListBoxBuilder DataBound(string dataBound)
Parameters
Type |
Name |
Description |
System.String |
dataBound |
|
Returns
DataSource(Action<DataManagerBuilder>)
Declaration
public ListBoxBuilder DataSource(Action<DataManagerBuilder> dataSource)
Parameters
Returns
DataSource(Double[])
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 ListBoxBuilder DataSource(double[] dataSource)
Parameters
Type |
Name |
Description |
System.Double[] |
dataSource |
|
Returns
DataSource(Object)
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 ListBoxBuilder DataSource(object dataSource)
Parameters
Type |
Name |
Description |
System.Object |
dataSource |
|
Returns
DataSource(String[])
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 ListBoxBuilder DataSource(string[] dataSource)
Parameters
Type |
Name |
Description |
System.String[] |
dataSource |
|
Returns
Destroyed(String)
Triggers when the component is destroyed.
Declaration
public ListBoxBuilder Destroyed(string destroyed)
Parameters
Type |
Name |
Description |
System.String |
destroyed |
|
Returns
Drag(String)
Triggers while dragging the list item.
Declaration
public ListBoxBuilder Drag(string drag)
Parameters
Type |
Name |
Description |
System.String |
drag |
|
Returns
DragStart(String)
Triggers after dragging the list item.
Declaration
public ListBoxBuilder DragStart(string dragStart)
Parameters
Type |
Name |
Description |
System.String |
dragStart |
|
Returns
Drop(String)
Triggers before dropping the list item on another list item.
Declaration
public ListBoxBuilder Drop(string drop)
Parameters
Type |
Name |
Description |
System.String |
drop |
|
Returns
Enabled(Boolean)
Specifies a value that indicates whether the component is enabled or not.
Declaration
public ListBoxBuilder Enabled(bool enabled = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enabled |
|
Returns
EnablePersistence(Boolean)
Enable or disable persisting component's state between page reloads.
If enabled, following list of states will be persisted.
- value
Declaration
public ListBoxBuilder EnablePersistence(bool enablePersistence = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enablePersistence |
|
Returns
EnableRtl(Boolean)
Enable or disable rendering component in right to left direction.
Declaration
public ListBoxBuilder EnableRtl(bool enableRtl = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enableRtl |
|
Returns
Fields(ListBoxFieldSettings)
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 ListBoxBuilder Fields(ListBoxFieldSettings fields)
Parameters
Returns
Fields(Action<ListBoxFieldSettingsBuilder>)
Declaration
public ListBoxBuilder Fields(Action<ListBoxFieldSettingsBuilder> fields)
Parameters
Returns
FilterBarPlaceholder(String)
Accepts the value to be displayed as a watermark text on the filter bar.
Declaration
public ListBoxBuilder FilterBarPlaceholder(string filterBarPlaceholder)
Parameters
Type |
Name |
Description |
System.String |
filterBarPlaceholder |
|
Returns
Filtering(String)
Triggers on typing a character in the component.
Declaration
public ListBoxBuilder Filtering(string filtering)
Parameters
Type |
Name |
Description |
System.String |
filtering |
|
Returns
FilterType(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 ListBoxBuilder FilterType(FilterType filterType)
Parameters
Returns
Height(Double)
Sets the height of the ListBox component.
Declaration
public ListBoxBuilder Height(double height)
Parameters
Type |
Name |
Description |
System.Double |
height |
|
Returns
Height(String)
Sets the height of the ListBox component.
Declaration
public ListBoxBuilder Height(string height)
Parameters
Type |
Name |
Description |
System.String |
height |
|
Returns
HtmlAttributes(Object)
Allows additional HTML attributes such as title, name, etc., and
accepts n number of attributes in a key-value pair format.
Declaration
public ListBoxBuilder HtmlAttributes(object htmlAttributes)
Parameters
Type |
Name |
Description |
System.Object |
htmlAttributes |
|
Returns
ItemTemplate(String)
Accepts the template design and assigns it to each list item present in the popup.
We have built-in template engine
Declaration
public ListBoxBuilder ItemTemplate(string itemTemplate)
Parameters
Type |
Name |
Description |
System.String |
itemTemplate |
|
Returns
Locale(String)
Overrides the global culture and localization value for this component. Default global culture is 'en-US'.
Declaration
public ListBoxBuilder Locale(string locale)
Parameters
Type |
Name |
Description |
System.String |
locale |
|
Returns
MaximumSelectionLength(Double)
Sets limitation to the value selection.
based on the limitation, list selection will be prevented.
Declaration
public ListBoxBuilder MaximumSelectionLength(double maximumSelectionLength)
Parameters
Type |
Name |
Description |
System.Double |
maximumSelectionLength |
|
Returns
NoRecordsTemplate(String)
Accepts the template design and assigns it to popup list of component
when no data is available on the component.
Declaration
public ListBoxBuilder NoRecordsTemplate(string noRecordsTemplate)
Parameters
Type |
Name |
Description |
System.String |
noRecordsTemplate |
|
Returns
Query(String)
Accepts the external Query
which will execute along with the data processing.
Declaration
public ListBoxBuilder Query(string query)
Parameters
Type |
Name |
Description |
System.String |
query |
|
Returns
Render()
Declaration
public HtmlString Render()
Returns
Type |
Description |
Microsoft.AspNetCore.Html.HtmlString |
|
Scope(String)
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 ListBoxBuilder Scope(string scope)
Parameters
Type |
Name |
Description |
System.String |
scope |
|
Returns
SelectionSettings(ListBoxSelectionSettings)
Specifies the selection mode and its type.
Declaration
public ListBoxBuilder SelectionSettings(ListBoxSelectionSettings selectionSettings)
Parameters
Returns
SelectionSettings(Action<ListBoxSelectionSettingsBuilder>)
Declaration
public ListBoxBuilder SelectionSettings(Action<ListBoxSelectionSettingsBuilder> selectionSettings)
Parameters
Returns
SortOrder(Object)
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 ListBoxBuilder SortOrder(object sortOrder)
Parameters
Type |
Name |
Description |
System.Object |
sortOrder |
|
Returns
Specifies the toolbar items and its position.
Declaration
public ListBoxBuilder ToolbarSettings(ListBoxToolbarSettings toolbarSettings)
Parameters
Returns
Declaration
public ListBoxBuilder ToolbarSettings(Action<ListBoxToolbarSettingsBuilder> toolbarSettings)
Parameters
Returns
Value(Object)
Sets the specified item to the selected state or gets the selected item in the ListBox.
Declaration
public ListBoxBuilder Value(object value)
Parameters
Type |
Name |
Description |
System.Object |
value |
|
Returns