Class MultiSelectBuilder
Inheritance
System.Object
MultiSelectBuilder
Assembly: Syncfusion.EJ2.dll
Syntax
public class MultiSelectBuilder : ControlBuilder
Constructors
MultiSelectBuilder()
Declaration
public MultiSelectBuilder()
MultiSelectBuilder(MultiSelect)
Declaration
public MultiSelectBuilder(MultiSelect model)
Parameters
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 MultiSelectBuilder 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 MultiSelectBuilder 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 MultiSelectBuilder ActionFailure(string actionFailure)
Parameters
Type |
Name |
Description |
System.String |
actionFailure |
|
Returns
ActionFailureTemplate(String)
Accepts the template and assigns it to the popup list content of the MultiSelect component
when the data fetch request from the remote server fails.
Declaration
public MultiSelectBuilder ActionFailureTemplate(string actionFailureTemplate)
Parameters
Type |
Name |
Description |
System.String |
actionFailureTemplate |
|
Returns
AddTagOnBlur(Boolean)
By default, the typed value is converting into chip or update as value of the component when you press the enter key or select from the popup.
If you want to convert the typed value into chip or update as value of the component while focusing out the component, then enable this property.
If custom value is enabled, both custom value and value present in the list are converted into tag while focusing out the component; Otherwise, value present in the list is converted into tag while focusing out the component.
Declaration
public MultiSelectBuilder AddTagOnBlur(bool addTagOnBlur = true)
Parameters
Type |
Name |
Description |
System.Boolean |
addTagOnBlur |
|
Returns
AllowCustomValue(Boolean)
Allows user to add a
custom value
, the value which is not present in the suggestion list.
Declaration
public MultiSelectBuilder AllowCustomValue(bool allowCustomValue = true)
Parameters
Type |
Name |
Description |
System.Boolean |
allowCustomValue |
|
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 MultiSelectBuilder AllowFiltering(bool allowFiltering = true)
Parameters
Type |
Name |
Description |
System.Boolean |
allowFiltering |
|
Returns
BeforeOpen(String)
Fires when popup opens before animation.
Declaration
public MultiSelectBuilder BeforeOpen(string beforeOpen)
Parameters
Type |
Name |
Description |
System.String |
beforeOpen |
|
Returns
BeforeSelectAll(String)
Fires before select all process.
Declaration
public MultiSelectBuilder BeforeSelectAll(string beforeSelectAll)
Parameters
Type |
Name |
Description |
System.String |
beforeSelectAll |
|
Returns
Blur(String)
Event triggers when the input get focus-out.
Declaration
public MultiSelectBuilder Blur(string blur)
Parameters
Type |
Name |
Description |
System.String |
blur |
|
Returns
Change(String)
Fires each time when selection changes happened in list items after model and input value get affected.
Declaration
public MultiSelectBuilder Change(string change)
Parameters
Type |
Name |
Description |
System.String |
change |
|
Returns
ChangeOnBlur(Boolean)
By default, the multiselect component fires the change event while focus out the component.
If you want to fires the change event on every value selection and remove, then disable the changeOnBlur property.
Declaration
public MultiSelectBuilder ChangeOnBlur(bool changeOnBlur = true)
Parameters
Type |
Name |
Description |
System.Boolean |
changeOnBlur |
|
Returns
ChipSelection(String)
Event triggers when the chip selection.
Declaration
public MultiSelectBuilder ChipSelection(string chipSelection)
Parameters
Type |
Name |
Description |
System.String |
chipSelection |
|
Returns
Close(String)
Fires when popup close after animation completion.
Declaration
public MultiSelectBuilder Close(string close)
Parameters
Type |
Name |
Description |
System.String |
close |
|
Returns
Based on the property, when item get select popup visibility state will changed.
Declaration
public MultiSelectBuilder ClosePopupOnSelect(bool closePopupOnSelect = true)
Parameters
Type |
Name |
Description |
System.Boolean |
closePopupOnSelect |
|
Returns
Created(String)
Triggers when the component is created.
Declaration
public MultiSelectBuilder 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 MultiSelectBuilder CssClass(string cssClass)
Parameters
Type |
Name |
Description |
System.String |
cssClass |
|
Returns
CustomValueSelection(String)
Declaration
public MultiSelectBuilder CustomValueSelection(string customValueSelection)
Parameters
Type |
Name |
Description |
System.String |
customValueSelection |
|
Returns
DataBound(String)
Triggers when data source is populated in the popup list..
Declaration
public MultiSelectBuilder DataBound(string dataBound)
Parameters
Type |
Name |
Description |
System.String |
dataBound |
|
Returns
DataSource(Action<DataManagerBuilder>)
Declaration
public MultiSelectBuilder DataSource(Action<DataManagerBuilder> dataSource)
Parameters
Returns
DataSource(Double[])
Accepts the list items either through local or remote service and binds it to the MultiSelect component.
It can be an array of JSON Objects or an instance of
DataManager
.
Declaration
public MultiSelectBuilder 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 MultiSelect component.
It can be an array of JSON Objects or an instance of
DataManager
.
Declaration
public MultiSelectBuilder 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 MultiSelect component.
It can be an array of JSON Objects or an instance of
DataManager
.
Declaration
public MultiSelectBuilder DataSource(string[] dataSource)
Parameters
Type |
Name |
Description |
System.String[] |
dataSource |
|
Returns
DelimiterChar(String)
Sets the delimiter character for 'default' and 'delimiter' visibility modes.
Declaration
public MultiSelectBuilder DelimiterChar(string delimiterChar)
Parameters
Type |
Name |
Description |
System.String |
delimiterChar |
|
Returns
Destroyed(String)
Triggers when the component is destroyed.
Declaration
public MultiSelectBuilder Destroyed(string destroyed)
Parameters
Type |
Name |
Description |
System.String |
destroyed |
|
Returns
Enabled(Boolean)
Specifies a value that indicates whether the MultiSelect component is enabled or not.
Declaration
public MultiSelectBuilder Enabled(bool enabled = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enabled |
|
Returns
EnableGroupCheckBox(Boolean)
Specifies a Boolean value that indicates the whether the grouped list items are
allowed to check by checking the group header in checkbox mode.
By default, there is no checkbox provided for group headers.
This property allows you to render checkbox for group headers and to select
all the grouped items at once
Declaration
public MultiSelectBuilder EnableGroupCheckBox(bool enableGroupCheckBox = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enableGroupCheckBox |
|
Returns
EnableHtmlSanitizer(Boolean)
Defines whether to allow the cross-scripting site or not.
Declaration
public MultiSelectBuilder EnableHtmlSanitizer(bool enableHtmlSanitizer = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enableHtmlSanitizer |
|
Returns
EnablePersistence(Boolean)
Enable or disable persisting MultiSelect component's state between page reloads.
If enabled, following list of states will be persisted.
- value
Declaration
public MultiSelectBuilder 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 MultiSelectBuilder EnableRtl(bool enableRtl = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enableRtl |
|
Returns
EnableSelectionOrder(Boolean)
Reorder the selected items in popup visibility state.
Declaration
public MultiSelectBuilder EnableSelectionOrder(bool enableSelectionOrder = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enableSelectionOrder |
|
Returns
Fields(MultiSelectFieldSettings)
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 MultiSelectBuilder Fields(MultiSelectFieldSettings fields)
Parameters
Returns
Fields(Action<MultiSelectFieldSettingsBuilder>)
Declaration
public MultiSelectBuilder Fields(Action<MultiSelectFieldSettingsBuilder> fields)
Parameters
Returns
FilterBarPlaceholder(String)
Accepts the value to be displayed as a watermark text on the filter bar.
Declaration
public MultiSelectBuilder FilterBarPlaceholder(string filterBarPlaceholder)
Parameters
Type |
Name |
Description |
System.String |
filterBarPlaceholder |
|
Returns
Filtering(String)
Triggers event,when user types a text in search box.
For more details about filtering, refer to Filtering
documentation.
Declaration
public MultiSelectBuilder Filtering(string filtering)
Parameters
Type |
Name |
Description |
System.String |
filtering |
|
Returns
FilterType(FilterType)
Determines on which filter type, the MultiSelect component needs to be considered on search action.
The FilterType
and its supported data types are
Declaration
public MultiSelectBuilder FilterType(FilterType filterType)
Parameters
Returns
Specifies whether to display the floating label above the input element.
Possible values are:
Never: The label will never float in the input when the placeholder is available.
Always: The floating label will always float above the input.
Auto: The floating label will float above the input after focusing or entering a value in the input.
Declaration
public MultiSelectBuilder FloatLabelType(FloatLabelType floatLabelType)
Parameters
Returns
Focus(String)
Event triggers when the input get focused.
Declaration
public MultiSelectBuilder Focus(string focus)
Parameters
Type |
Name |
Description |
System.String |
focus |
|
Returns
Accepts the template design and assigns it to the footer container of the popup list.
For more details about the available template options refer to Template
documentation.
Declaration
public MultiSelectBuilder FooterTemplate(string footerTemplate)
Parameters
Type |
Name |
Description |
System.String |
footerTemplate |
|
Returns
GroupTemplate(String)
Accepts the template design and assigns it to the group headers present in the MultiSelect popup list.
Declaration
public MultiSelectBuilder GroupTemplate(string groupTemplate)
Parameters
Type |
Name |
Description |
System.String |
groupTemplate |
|
Returns
Accepts the template design and assigns it to the header container of the popup list.
For more details about the available template options refer to Template
documentation.
Declaration
public MultiSelectBuilder HeaderTemplate(string headerTemplate)
Parameters
Type |
Name |
Description |
System.String |
headerTemplate |
|
Returns
HideSelectedItem(Boolean)
Hides the selected item from the list item.
Declaration
public MultiSelectBuilder HideSelectedItem(bool hideSelectedItem = true)
Parameters
Type |
Name |
Description |
System.Boolean |
hideSelectedItem |
|
Returns
HtmlAttributes(Object)
Gets or sets the additional attribute to HtmlAttributes
property in MultiSelect,
which helps to add attribute like title, name etc, input should be key value pair.
Declaration
public MultiSelectBuilder HtmlAttributes(object htmlAttributes)
Parameters
Type |
Name |
Description |
System.Object |
htmlAttributes |
|
Returns
IgnoreAccent(Boolean)
ignoreAccent set to true, then ignores the diacritic characters or accents when filtering.
Declaration
public MultiSelectBuilder IgnoreAccent(bool ignoreAccent = true)
Parameters
Type |
Name |
Description |
System.Boolean |
ignoreAccent |
|
Returns
IgnoreCase(Boolean)
Declaration
public MultiSelectBuilder IgnoreCase(bool ignoreCase = true)
Parameters
Type |
Name |
Description |
System.Boolean |
ignoreCase |
|
Returns
ItemTemplate(String)
Accepts the template design and assigns it to each list item present in the popup.
For more details about the available template options refer to Template
documentation.
Declaration
public MultiSelectBuilder 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 MultiSelectBuilder 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 MultiSelectBuilder MaximumSelectionLength(double maximumSelectionLength)
Parameters
Type |
Name |
Description |
System.Double |
maximumSelectionLength |
|
Returns
Mode(VisualMode)
configures visibility mode for component interaction.
Declaration
public MultiSelectBuilder Mode(VisualMode mode)
Parameters
Returns
NoRecordsTemplate(String)
Accepts the template design and assigns it to popup list of MultiSelect component
when no data is available on the component.
Declaration
public MultiSelectBuilder NoRecordsTemplate(string noRecordsTemplate)
Parameters
Type |
Name |
Description |
System.String |
noRecordsTemplate |
|
Returns
Open(String)
Fires when popup opens after animation completion.
Declaration
public MultiSelectBuilder Open(string open)
Parameters
Type |
Name |
Description |
System.String |
open |
|
Returns
OpenOnClick(Boolean)
Whether to automatically open the popup when the control is clicked.
Declaration
public MultiSelectBuilder OpenOnClick(bool openOnClick = true)
Parameters
Type |
Name |
Description |
System.Boolean |
openOnClick |
|
Returns
Placeholder(String)
Gets or sets the placeholder in the component to display the given information
in input when no item selected.
Declaration
public MultiSelectBuilder Placeholder(string placeholder)
Parameters
Type |
Name |
Description |
System.String |
placeholder |
|
Returns
Gets or sets the height of the popup list. By default it renders based on its list item.
For more details about the popup configuration refer to
Popup Configuration
documentation.
Declaration
public MultiSelectBuilder PopupHeight(string popupHeight)
Parameters
Type |
Name |
Description |
System.String |
popupHeight |
|
Returns
Gets or sets the width of the popup list and percentage values has calculated based on input width.
For more details about the popup configuration refer to
Popup Configuration
documentation.
Declaration
public MultiSelectBuilder PopupWidth(string popupWidth)
Parameters
Type |
Name |
Description |
System.String |
popupWidth |
|
Returns
Query(String)
Accepts the external Query
which will execute along with the data processing in MultiSelect.
Declaration
public MultiSelectBuilder Query(string query)
Parameters
Type |
Name |
Description |
System.String |
query |
|
Returns
Readonly(Boolean)
Declaration
public MultiSelectBuilder Readonly(bool readOnly = true)
Parameters
Type |
Name |
Description |
System.Boolean |
readOnly |
|
Returns
Removed(String)
Fires after the selected item removed from the widget.
Declaration
public MultiSelectBuilder Removed(string removed)
Parameters
Type |
Name |
Description |
System.String |
removed |
|
Returns
Removing(String)
Fires before the selected item removed from the widget.
Declaration
public MultiSelectBuilder Removing(string removing)
Parameters
Type |
Name |
Description |
System.String |
removing |
|
Returns
Render()
Declaration
public HtmlString Render()
Returns
Type |
Description |
Microsoft.AspNetCore.Html.HtmlString |
|
Select(String)
Triggers when an item in the popup is selected by the user either with mouse/tap or with keyboard navigation.
Declaration
public MultiSelectBuilder Select(string select)
Parameters
Type |
Name |
Description |
System.String |
select |
|
Returns
SelectAllText(String)
Specifies the selectAllText to be displayed on the component.
Declaration
public MultiSelectBuilder SelectAllText(string selectAllText)
Parameters
Type |
Name |
Description |
System.String |
selectAllText |
|
Returns
SelectedAll(String)
Fires after select all process completion.
Declaration
public MultiSelectBuilder SelectedAll(string selectedAll)
Parameters
Type |
Name |
Description |
System.String |
selectedAll |
|
Returns
Enables close icon with the each selected item.
Declaration
public MultiSelectBuilder ShowClearButton(bool showClearButton = true)
Parameters
Type |
Name |
Description |
System.Boolean |
showClearButton |
|
Returns
ShowDropDownIcon(Boolean)
Allows you to either show or hide the DropDown button on the component
Declaration
public MultiSelectBuilder ShowDropDownIcon(bool showDropDownIcon = true)
Parameters
Type |
Name |
Description |
System.Boolean |
showDropDownIcon |
|
Returns
ShowSelectAll(Boolean)
Allows you to either show or hide the selectAll option on the component.
Declaration
public MultiSelectBuilder ShowSelectAll(bool showSelectAll = true)
Parameters
Type |
Name |
Description |
System.Boolean |
showSelectAll |
|
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 MultiSelectBuilder SortOrder(object sortOrder)
Parameters
Type |
Name |
Description |
System.Object |
sortOrder |
|
Returns
Tagging(String)
Fires before set the selected item as chip in the component.
For more details about chip customization refer Chip Customization
Declaration
public MultiSelectBuilder Tagging(string tagging)
Parameters
Type |
Name |
Description |
System.String |
tagging |
|
Returns
Text(String)
Selects the list item which maps the data text
field in the component.
Declaration
public MultiSelectBuilder Text(string text)
Parameters
Type |
Name |
Description |
System.String |
text |
|
Returns
UnSelectAllText(String)
Specifies the UnSelectAllText to be displayed on the component.
Declaration
public MultiSelectBuilder UnSelectAllText(string unSelectAllText)
Parameters
Type |
Name |
Description |
System.String |
unSelectAllText |
|
Returns
Value(Double[])
Selects the list item which maps the data value
field in the component.
{% codeBlock src='multiselect/value/index.md' %}{% endcodeBlock %}
Declaration
public MultiSelectBuilder Value(double[] value)
Parameters
Type |
Name |
Description |
System.Double[] |
value |
|
Returns
Value(Object)
Selects the list item which maps the data value
field in the component.
{% codeBlock src='multiselect/value/index.md' %}{% endcodeBlock %}
Declaration
public MultiSelectBuilder Value(object value)
Parameters
Type |
Name |
Description |
System.Object |
value |
|
Returns
Value(String[])
Selects the list item which maps the data value
field in the component.
{% codeBlock src='multiselect/value/index.md' %}{% endcodeBlock %}
Declaration
public MultiSelectBuilder Value(string[] value)
Parameters
Type |
Name |
Description |
System.String[] |
value |
|
Returns
ValueTemplate(String)
Accepts the template design and assigns it to the selected list item in the input element of the component.
For more details about the available template options refer to
Template
documentation.
Declaration
public MultiSelectBuilder ValueTemplate(string valueTemplate)
Parameters
Type |
Name |
Description |
System.String |
valueTemplate |
|
Returns
Width(String)
Gets or sets the width of the component. By default, it sizes based on its parent.
container dimension.
Declaration
public MultiSelectBuilder Width(string width)
Parameters
Type |
Name |
Description |
System.String |
width |
|
Returns
ZIndex(Double)
specifies the z-index value of the component popup element.
Declaration
public MultiSelectBuilder ZIndex(double zIndex)
Parameters
Type |
Name |
Description |
System.Double |
zIndex |
|
Returns