Class ListBoxPropertiesBuilder
Represents a class for ListBoxPropertiesBuilder which includes show rounded corner, allow multiselection, show checkbox, and enable persistence properties.
Inheritance
System.Object
ListBoxPropertiesBuilder
Implements
System.Web.IHtmlString
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: Syncfusion.EJ.dll
Syntax
public class ListBoxPropertiesBuilder : IPropertiesBuilder, IHtmlString
Constructors
ListBoxPropertiesBuilder()
Declaration
public ListBoxPropertiesBuilder()
ListBoxPropertiesBuilder(ListBox)
Declaration
public ListBoxPropertiesBuilder(ListBox listBox)
Parameters
Type |
Name |
Description |
ListBox |
listBox |
|
Fields
listBox
Declaration
Field Value
Methods
AllowDrag(Boolean)
Enables/disables the dragging behavior of the items in ListBox widget.
Declaration
public ListBoxPropertiesBuilder AllowDrag(bool allowDrag)
Parameters
Type |
Name |
Description |
System.Boolean |
allowDrag |
|
Returns
AllowDragAndDrop(Boolean)
Enables/disables the drag and drop behavior of the ListBox widget.
Declaration
[Obsolete("The AllowDragAndDrop property has been deprecated.Use AllowDrag and AllowDrop property instead of AllowDragAndDrop")]
public ListBoxPropertiesBuilder AllowDragAndDrop(bool allowDragAndDrop)
Parameters
Type |
Name |
Description |
System.Boolean |
allowDragAndDrop |
|
Returns
AllowDrop(Boolean)
Accepts the items which are dropped in to it, when it is set to true.
Declaration
public ListBoxPropertiesBuilder AllowDrop(bool allowDrop)
Parameters
Type |
Name |
Description |
System.Boolean |
allowDrop |
|
Returns
AllowMultiSelection()
Enables or disables multiple selection.
Declaration
public ListBoxPropertiesBuilder AllowMultiSelection()
Returns
AllowMultiSelection(Boolean)
Enables or disables multiple selection.A boolean variable allowMultiSelection is passed as an argument.
Declaration
public ListBoxPropertiesBuilder AllowMultiSelection(bool allowMultiSelection)
Parameters
Type |
Name |
Description |
System.Boolean |
allowMultiSelection |
|
Returns
Loads the list data on demand via scrolling behavior to improve the application’s performance. There are two ways to load data which can be defined using “virtualScrollMode” property.
Declaration
public ListBoxPropertiesBuilder AllowVirtualScrolling()
Returns
Loads the list data on demand via scrolling behavior to improve the application’s performance. There are two ways to load data which can be defined using “virtualScrollMode” property.A booleav variable allowVirtualScrolling is passed.
Declaration
public ListBoxPropertiesBuilder AllowVirtualScrolling(bool allowVirtualScrolling)
Parameters
Type |
Name |
Description |
System.Boolean |
allowVirtualScrolling |
|
Returns
CascadeTo(String)
Dynamically populate data of a list box while selecting an item in another list box i.e. rendering child list box based on the item selection in parent list box. This property accepts the id of the child ListBox widget to populate the data.
Declaration
public ListBoxPropertiesBuilder CascadeTo(string cascadeTo)
Parameters
Type |
Name |
Description |
System.String |
cascadeTo |
|
Returns
CaseSensitiveSearch()
Enables or disables the case sensitive search for list item by typing the text (search) value.
Declaration
public ListBoxPropertiesBuilder CaseSensitiveSearch()
Returns
CaseSensitiveSearch(Boolean)
Enables or disables the case sensitive search for list item by typing the text (search) value.A boolean variable caseSensitiveSearch is passed as an argument.
Declaration
public ListBoxPropertiesBuilder CaseSensitiveSearch(bool caseSensitiveSearch)
Parameters
Type |
Name |
Description |
System.Boolean |
caseSensitiveSearch |
|
Returns
CheckAll()
To check all the items of the ListBox widget. It works only when the showCheckbox property is set to true.
Declaration
[Obsolete("The CheckAll property has been deprecated.Use 'checkAll' method instead of CheckAll property")]
public ListBoxPropertiesBuilder CheckAll()
Returns
CheckAll(Boolean)
To check all the items of the ListBox widget. It works only when the showCheckbox property is set to true.checkAll is the boolean variable that is passed.
Declaration
public ListBoxPropertiesBuilder CheckAll(bool checkAll)
Parameters
Type |
Name |
Description |
System.Boolean |
checkAll |
|
Returns
CheckedIndices(List<Int32>)
Set of list items to be checked by default using its index. It works only when the showCheckbox property is set to true.
Declaration
public ListBoxPropertiesBuilder CheckedIndices(List<int> checkedIndices)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<System.Int32> |
checkedIndices |
|
Returns
CheckedItemlist(List<Int32>)
List of items to be checked by default using its index. It works only when the showCheckbox property is set to true.
Declaration
[Obsolete("The CheckedItemlist property has been deprecated.Use 'CheckedIndices' instead of CheckedItemlist")]
public ListBoxPropertiesBuilder CheckedItemlist(List<int> checkedItemlist)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<System.Int32> |
checkedItemlist |
|
Returns
CheckedItems(List<Int32>)
List of items to be checked by default using its index. It works only when the showCheckbox property is set to true.
Declaration
[Obsolete("The CheckedItems property has been deprecated.Use 'CheckedIndices' instead of CheckedItems")]
public ListBoxPropertiesBuilder CheckedItems(List<int> checkedItems)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<System.Int32> |
checkedItems |
|
Returns
CheckItemsByIndex(String)
Declaration
[Obsolete("The CheckItemsByIndex property has been deprecated.Use 'CheckedIndices' instead of CheckItemsByIndex")]
public ListBoxPropertiesBuilder CheckItemsByIndex(string checkItemsByIndex)
Parameters
Type |
Name |
Description |
System.String |
checkItemsByIndex |
|
Returns
ClientSideEvents(Action<ListBoxClientSideEventsBuilder>)
Declaration
public ListBoxPropertiesBuilder ClientSideEvents(Action<ListBoxClientSideEventsBuilder> clientSideEvents)
Parameters
Returns
CssClass(String)
The root class for the ListBox widget to customize the existing theme.
Declaration
public ListBoxPropertiesBuilder CssClass(string customCssClass)
Parameters
Type |
Name |
Description |
System.String |
customCssClass |
|
Returns
Datasource(DataSource)
Contains the list of data for generating the list items.A variable dataSource is passed to the list.
Declaration
public ListBoxPropertiesBuilder Datasource(DataSource dataSource)
Parameters
Returns
Datasource(Action<DataSourceBuilder>)
Contains the list of data for generating the list items.Here data source is passed in a list format.
Declaration
public ListBoxPropertiesBuilder Datasource(Action<DataSourceBuilder> dataSource)
Parameters
Returns
Datasource(IEnumerable)
Contains the list of data for generating the list items.A variable dataSource is passed in IEnumerable type.
Declaration
public ListBoxPropertiesBuilder Datasource(IEnumerable dataSource)
Parameters
Type |
Name |
Description |
System.Collections.IEnumerable |
dataSource |
|
Returns
DisableItemsByIndex(String)
Disables set of list items using its index value.
Declaration
[Obsolete("The DisableItemsByIndex property has been deprecated.Use 'disableItemByIndex' method instead of DisableItemsByIndex property")]
public ListBoxPropertiesBuilder DisableItemsByIndex(string disableItemsByIndex)
Parameters
Type |
Name |
Description |
System.String |
disableItemsByIndex |
|
Returns
Enabled()
Enables or disables the ListBox widget.
Declaration
public ListBoxPropertiesBuilder Enabled()
Returns
Enabled(Boolean)
Enables or disables the ListBox widget.A boolean variable enabled is passed as an argument.
Declaration
public ListBoxPropertiesBuilder Enabled(bool enabled)
Parameters
Type |
Name |
Description |
System.Boolean |
enabled |
|
Returns
EnableIncrementalSearch()
Enables or disables the search behavior to find the specific list item by typing the text value.
Declaration
public ListBoxPropertiesBuilder EnableIncrementalSearch()
Returns
EnableIncrementalSearch(Boolean)
Enables or disables the search behavior to find the specific list item by typing the text value.A boolean variable enableIncrementalSearch is passed.
Declaration
public ListBoxPropertiesBuilder EnableIncrementalSearch(bool enableIncrementalSearch)
Parameters
Type |
Name |
Description |
System.Boolean |
enableIncrementalSearch |
|
Returns
EnableItemsByIndex(String)
Enables the set of disabled list items using its index value.
Declaration
[Obsolete("The EnableItemsByIndex property has been deprecated.Use 'enableItemByIndex' instead of EnableItemsByIndex property")]
public ListBoxPropertiesBuilder EnableItemsByIndex(string enableItemsByIndex)
Parameters
Type |
Name |
Description |
System.String |
enableItemsByIndex |
|
Returns
EnableLoadOnDemand()
Loads data on demand for the ListBox widget via scrolling behavior.If this is set to true, this will implicitly make allowVirtualScrolling to true and sets virtualScrollMode to “normal”.
Declaration
[Obsolete("The EnableLoadOnDemand property has been deprecated.Use 'AllowVirtualScrolling' instead of EnableLoadOnDemand")]
public ListBoxPropertiesBuilder EnableLoadOnDemand()
Returns
EnableLoadOnDemand(Boolean)
Loads data on demand for the ListBox widget via scrolling behavior.If this is set to true, this will implicitly make allowVirtualScrolling to true and sets virtualScrollMode to “normal”.A boolean variable enableLoadOnDemand is passed.
Declaration
public ListBoxPropertiesBuilder EnableLoadOnDemand(bool enableLoadOnDemand)
Parameters
Type |
Name |
Description |
System.Boolean |
enableLoadOnDemand |
|
Returns
EnablePersistence()
Allows the current model values to be saved in local storage or browser cookies for state maintenance when it is set to true.
Declaration
public ListBoxPropertiesBuilder EnablePersistence()
Returns
EnablePersistence(Boolean)
Allows the current model values to be saved in local storage or browser cookies for state maintenance when it is set to true.A boolean variable enablePersistence is passed as an argument.
Declaration
public ListBoxPropertiesBuilder EnablePersistence(bool enablePersistence)
Parameters
Type |
Name |
Description |
System.Boolean |
enablePersistence |
|
Returns
EnableRTL()
Displays the ListBox widget’s content from right to left when enabled.
Declaration
public ListBoxPropertiesBuilder EnableRTL()
Returns
EnableRTL(Boolean)
Displays the ListBox widget’s content from right to left when enabled.A boolean variable enableRTL is passed.
Declaration
public ListBoxPropertiesBuilder EnableRTL(bool enableRTL)
Parameters
Type |
Name |
Description |
System.Boolean |
enableRTL |
|
Returns
Loads data on demand for the ListBox widget via scrolling behavior. If this is set to true, this will implicitly make allowVirtualScrolling to true and sets virtualScrollMode to “continuous”.
Declaration
[Obsolete("The EnableVirtualScrolling property has been deprecated.Use 'VirtualScrollMode=VirtualScrollMode.Normal' instead of EnableVirtualScrolling")]
public ListBoxPropertiesBuilder EnableVirtualScrolling()
Returns
Loads data on demand for the ListBox widget via scrolling behavior. If this is set to true, this will implicitly make allowVirtualScrolling to true and sets virtualScrollMode to “continuous”.A boolean variable enableVirtualScrolling is passed.
Declaration
public ListBoxPropertiesBuilder EnableVirtualScrolling(bool enableVirtualScrolling)
Parameters
Type |
Name |
Description |
System.Boolean |
enableVirtualScrolling |
|
Returns
EnableWordWrap(Boolean)
Enable WordWrap, when it is set to false.
Declaration
public ListBoxPropertiesBuilder EnableWordWrap(bool allowDrop)
Parameters
Type |
Name |
Description |
System.Boolean |
allowDrop |
|
Returns
Height(String)
Defines the height of the ListBox widget.
Declaration
public ListBoxPropertiesBuilder Height(string height)
Parameters
Type |
Name |
Description |
System.String |
height |
|
Returns
HtmlAttributes(IDictionary<String, Object>)
Declaration
public ListBoxPropertiesBuilder HtmlAttributes(IDictionary<string, object> itemHtmlAttributes)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IDictionary<System.String, System.Object> |
itemHtmlAttributes |
|
Returns
ItemHeight(String)
Defines the itemHeight of the ListBox widget.
Declaration
public ListBoxPropertiesBuilder ItemHeight(string itemHeight)
Parameters
Type |
Name |
Description |
System.String |
itemHeight |
|
Returns
ItemRequestCount(Int32)
The number of list items to be loaded in the list box while enabling virtual scrolling and when virtualScrollMode is set to continuous.
Declaration
public ListBoxPropertiesBuilder ItemRequestCount(int itemRequestCount)
Parameters
Type |
Name |
Description |
System.Int32 |
itemRequestCount |
|
Returns
ItemsCount(Int32)
The number of list items to be shown in the ListBox widget. The remaining list items will be scrollable.
Declaration
public ListBoxPropertiesBuilder ItemsCount(int itemsCount)
Parameters
Type |
Name |
Description |
System.Int32 |
itemsCount |
|
Returns
ListBoxFields(Action<ListBoxFieldsBuilder>)
Mapping fields for the data items of the ListBox widget.A list namec fields is passed.
Declaration
public ListBoxPropertiesBuilder ListBoxFields(Action<ListBoxFieldsBuilder> fields)
Parameters
Returns
LoadDataOnInit(Boolean)
Loads data for the listbox by default (i.e. on initialization) when it is set to true. It creates empty ListBox if it is set to false.
Declaration
public ListBoxPropertiesBuilder LoadDataOnInit(bool loadDataOnInit)
Parameters
Type |
Name |
Description |
System.Boolean |
loadDataOnInit |
|
Returns
Query(String)
The query to retrieve required data from the data source.
Declaration
public ListBoxPropertiesBuilder Query(string query)
Parameters
Type |
Name |
Description |
System.String |
query |
|
Returns
Render()
Declaration
SelectedIndex(Int32)
The list item to be selected by default using its index.
Declaration
public ListBoxPropertiesBuilder SelectedIndex(int selectedIndex)
Parameters
Type |
Name |
Description |
System.Int32 |
selectedIndex |
|
Returns
SelectedIndices(List<Int32>)
The list items to be selected by default using its indices. To use this property allowMultiSelection should be enabled.
Declaration
public ListBoxPropertiesBuilder SelectedIndices(List<int> selectedIndices)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<System.Int32> |
selectedIndices |
|
Returns
SelectedItemIndex(Int32)
The item to be selected by default using its index.
Declaration
[Obsolete("The SelectedItemIndex property has been deprecated.Use 'SelectedIndex' instead of SelectedItemIndex")]
public ListBoxPropertiesBuilder SelectedItemIndex(int selectedItemIndex)
Parameters
Type |
Name |
Description |
System.Int32 |
selectedItemIndex |
|
Returns
SelectedItemlist(List<Int32>)
The list of items to be selected by default using its index. To use this property allowMultiSelection should be enabled.
Declaration
[Obsolete("The SelectedItemlist property has been deprecated.Use 'SelectedIndices' instead of SelectedItemlist")]
public ListBoxPropertiesBuilder SelectedItemlist(List<int> selectedItems)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<System.Int32> |
selectedItems |
|
Returns
SelectedItems(List<Int32>)
The list of items to be selected by default using its index. To use this property allowMultiSelection should be enabled.
Declaration
[Obsolete("The SelectedItems property has been deprecated.Use 'SelectedIndices' instead of selectedItems ")]
public ListBoxPropertiesBuilder SelectedItems(List<int> selectedItems)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<System.Int32> |
selectedItems |
|
Returns
ShowCheckbox()
Enables/Disables the multi selection option with the help of checkbox control.
Declaration
public ListBoxPropertiesBuilder ShowCheckbox()
Returns
ShowCheckbox(Boolean)
Enables/Disables the multi selection option with the help of checkbox control.A boolean variable showCheckbox is passed as an argument.
Declaration
public ListBoxPropertiesBuilder ShowCheckbox(bool showCheckbox)
Parameters
Type |
Name |
Description |
System.Boolean |
showCheckbox |
|
Returns
ShowRoundedCorner()
To display the ListBox container with rounded corners.
Declaration
public ListBoxPropertiesBuilder ShowRoundedCorner()
Returns
ShowRoundedCorner(Boolean)
To display the ListBox container with rounded corners.A boolean variable showRoundedCorner is passed as an argument.
Declaration
public ListBoxPropertiesBuilder ShowRoundedCorner(bool showRoundedCorner)
Parameters
Type |
Name |
Description |
System.Boolean |
showRoundedCorner |
|
Returns
SortOrder(SortOrder)
This Property is used to sort listBox Items either in ascending / descending Order.
Declaration
public ListBoxPropertiesBuilder SortOrder(SortOrder sortOrder)
Parameters
Type |
Name |
Description |
SortOrder |
sortOrder |
sortOrder
|
Returns
TargetID(String)
Specifies the targetID for the listbox items.
Declaration
public ListBoxPropertiesBuilder TargetID(string targetID)
Parameters
Type |
Name |
Description |
System.String |
targetID |
|
Returns
Template(String)
The template to display the ListBox widget with customized appearance.
Declaration
public ListBoxPropertiesBuilder Template(string template)
Parameters
Type |
Name |
Description |
System.String |
template |
|
Returns
Text(String)
Declaration
public ListBoxPropertiesBuilder Text(string text)
Parameters
Type |
Name |
Description |
System.String |
text |
|
Returns
ToHtmlString()
Declaration
public string ToHtmlString()
Returns
Type |
Description |
System.String |
|
TotalItemsCount(Int32)
The total number of list items to be rendered in the ListBox widget.
Declaration
public ListBoxPropertiesBuilder TotalItemsCount(int totalItemsCount)
Parameters
Type |
Name |
Description |
System.Int32 |
totalItemsCount |
|
Returns
UncheckAll()
Unchecks all the checked list items. It is dependent on showCheckbox property.
Declaration
[Obsolete("The UncheckAll property has been deprecated.Use 'uncheckAll' method instead of UnCheckAll property")]
public ListBoxPropertiesBuilder UncheckAll()
Returns
UncheckAll(Boolean)
Unchecks all the checked list items. It is dependent on showCheckbox property.A boolean variable uncheckAll is passed as an argument.
Declaration
public ListBoxPropertiesBuilder UncheckAll(bool uncheckAll)
Parameters
Type |
Name |
Description |
System.Boolean |
uncheckAll |
|
Returns
UncheckItemsByIndex(String)
Declaration
[Obsolete("The UncheckItemsByIndex property has been deprecated.Use 'uncheckItemByIndex' method instead of UncheckItemsByIndex property")]
public ListBoxPropertiesBuilder UncheckItemsByIndex(string uncheckItemsByIndex)
Parameters
Type |
Name |
Description |
System.String |
uncheckItemsByIndex |
|
Returns
Value(String)
Holds the selected items values and used to bind value to the list item using angular and knockout.
Declaration
public ListBoxPropertiesBuilder Value(string value)
Parameters
Type |
Name |
Description |
System.String |
value |
|
Returns
Specifies the virtual scroll mode to load the list data on demand via scrolling behavior.
Declaration
public ListBoxPropertiesBuilder VirtualScrollMode(VirtualScrollMode virtualScrollMode)
Parameters
Returns
Width(String)
Defines the width of the ListBox widget.
Declaration
public ListBoxPropertiesBuilder Width(string width)
Parameters
Type |
Name |
Description |
System.String |
width |
|
Returns
Implements
System.Web.IHtmlString