Name | Type | Default | Description |
AllowDrag | bool | false | Enables or disables the ability to drag list items out of the List box. Disabled items cannot be dragged. |
AllowDrop | bool | false | Enables or disables the ability to drop list items inside the target List box. |
AlternationCount | int | 0 | Determines the number of color alternations in rows. |
AlternationEnd | int | 0 | Determines the ending index of color alternations in rows. |
AlternationStart | int | 0 | Determines the starting index of color alternations in rows |
AutoSort | bool | true | Enables or disables auto sorting. If sorted is enabled, but autoSort is false, the element will not be re-sorted automatically. |
DataSource | object | N/A | Determines the data source that will be loaded to the ListBox. The dataSource can be an array of strings/numbers or objects where the attributes represent the properties of a List Item. For example label, value, group. It can also be a callback that returns an Array of items as previously described. |
Disabled | bool | false | Enables or disables the list box. |
DisplayLoadingIndicator | bool | false | Determines whether an indicator will appear during filtering and remote item loading. |
DisplayMember | string | "" | Sets or gets the displayMember. The displayMember specifies the name of an object property to display. The name is contained in the collection specified by the 'dataSource' property. |
DragOffset | int[] | new int[]{} | Determines the offset of the drag feedback element from the mouse cursor when dragging an item. The first member of the array is the horizontal offset and the second one - the vertical offset. |
DropAction | ListBoxDropAction | ListBoxDropAction.Move | Determines what happens when an item is dropped. |
Editable | bool | false | Determines if list items can be edited or not. If enabled, items can be edited by double clicking on a target item ( that is not disabled ) or pressing the F2 key on the keyboard. |
Filterable | bool | false | Determines whether list items can be filtered or not. If enable a filter input appears at the top of the list box. |
FilterCallback | object | N/A | A callback that should return a condition that will be used for custom item filtering. Used in conjunction with filterMode 'custom' |
FilterMode | FilterMode | FilterMode.ContainsIgnoreCase | Determines the filtering mode. |
FilterInputPlaceholder | string | "" | Determines the placeholder for the filter input field. |
Grouped | bool | false | If enabled, the items will be grouped by their first letter. Can't be applied if the dataSource already contains groups. |
GroupMember | string | "null" | Determines which attribute from the dataSource object will be used as the group member for the items. If not set, by default 'group' property is used from the source object. groupMember is especially usefull when loading the data from a JSON file as a dataSource for the ListBox and there's a specific property that should be used to group the items. |
HorizontalScrollBarVisibility | HorizontalScrollBarVisibility | HorizontalScrollBarVisibility.Auto | Determines the visibility of the horizontal Scroll bar. |
IncrementalSearchDelay | int | 700 | IncrementalSearchDelay property specifies the time-interval in milliseconds until the previous search query is cleared. The timer starts when the user stops typing. A new query can be started only when the delay has passed. |
IncrementalSearchMode | SearchMode | SearchMode.StartsWithIgnoreCase | Sets ot gets the mode of the incremental search mode. Incremental search is enabled by default. Typing while the List box is focused starts the incremental search. |
ItemHeight | int | N/A | Sets the height for all list box items. Used only when virtualization is enabled. |
ItemMeasureMode | ListItemMeasureMode | ListItemMeasureMode.Auto | Determines the item width measuring algorithm. |
ItemTemplate | object | N/A | A string that represents the id of an HTMLTemplateElement inside the DOM or a reference to the template itself. It's used to set a custom template for the list items. |
LoadingIndicatorPlaceholder | string | "Loading..." | Determines the text that will be displayed next to the loading indicator when the loader is visible and it's position is top or bottom. |
LoadingIndicatorPosition | VerticalAlignment | VerticalAlignment.Center | Determines the position of the loading indicator. |
Locale | string | "en" | Sets or gets the language. Used in conjunction with the property messages. |
Messages | object | N/A | Sets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property language. |
Name | string | "" | Sets or gets the name attribute for the element. Name is used when submiting HTML forms. |
Placeholder | string | "No Items" | Determines the placeholder that will be shown when the List box is empty. |
Readonly | bool | false | Sets or gets the readonly property. If the element is readonly, users cannot interact with it. |
RightToLeft | bool | false | Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts. |
SelectedIndexes | int[] | new int[]{} | Sets or gets the selected indexes. Selected indexes represents an array of the indexes of the items that should be selected. |
SelectedValues | string[] | new string[]{} | Sets or gets elected indexes. Selected values represents the values of the items that should be selected. |
SelectionMode | ListSelectionMode | ListSelectionMode.OneOrManyExtended | Determines how many items can be selected depending on the selection mode. |
SelectionChangeAction | ListBoxSelectionChangeAction | ListBoxSelectionChangeAction.Release | Determines when listbox selection is achieved - on 'press' or 'release'. |
Sorted | bool | false | Determines whether the items are sorted alphabetically or not |
SortDirection | string | "asc" | Determines sorting direction - ascending(asc) or descending(desc) |
Theme | string | "" | Determines the theme for the element. Themes define the look of the elements. |
TopVisibleIndex | int | -1 | Ensures the item with the target index is in view as the first (top) item in the list box. |
Unfocusable | bool | false | If is set to true, the element cannot be focused. |
Value | object | N/A | Sets or gets the value. Returns the selection. Return type: {label: string, value: any}[]. |
ValueMember | string | "" | Determines the value member of an item. Stored as value in the item object. Similar to groupMember, valueMember is especially usefull when using data from a JSON file as a dataSource for the ListBox and there's a specific property that should be used for the value the items. |
VerticalScrollBarVisibility | VerticalScrollBarVisibility | VerticalScrollBarVisibility.Auto | Determines the visibility of the vertical scroll bar. |
Virtualized | bool | false | Determines weather or not Virtualization is used for the ListBox. Virtualization allows a huge amount of items to be loaded to the List box while preserving the performance. For example a milion items can be loaded to the list box. |
Name | Type | Arguments | Description |
AppendChild | dynamic | dynamic node | Appends a ListItem to the end of the list of items inside element.Args: dynamic node - A ListItem element that should be added to the rest of the items as the last item. |
ClearItems | void | N/A | Removes all items from the listBox. |
ClearSelection | void | N/A | Unselects all items. |
EnsureVisible | void | object item | Ensures the target item is visible by scrolling to it.Args: object item - A list item or value of the desired item to be visible. |
GetDataSourceAsync() | Task<IEnumerable<object>> | 'N/A' | Gets the "DataSource" property as Task<IEnumerable<object>>. |
GetItem | object | string value | Returns an item instance from the listBox.Args: string value - The value of an item from the listBox. |
GetItems | IEnumerable<object> | N/A | Returns an array of ListBox items. |
GetSelectedIndexesAsync() | Task<int[]> | 'N/A' | Gets the "SelectedIndexes" property as Task<int[]>. |
GetSelectedValuesAsync() | Task<string[]> | 'N/A' | Gets the "SelectedValues" property as Task<string[]>. |
GetValueAsync() | Task<object> | 'N/A' | Gets the "Value" property as Task<object>. |
Insert | void | int index, object items | Inserts a new item at a specified index.Args: int index - The index where the item must be inserted.,object items - A single item/definition or an array of List Items/definitions of list items to be inserted. The format of the item definitions is the same as the format of the "dataSource" property. |
InsertBefore | dynamic | dynamic node, dynamic referenceNode | Inserts a new ListItem before another in the list.Args: dynamic node - A ListItem element that should be added before the referenceItem in the list.,dynamic referenceNode - A ListItem element that acts as the reference item before which a new item is about to be inserted. The referenceNode must be in the same list as the node. |
Refresh | void | 'N/A' | Refreshes the Blazor Component. Performs a layout of the HTML Elements and recalculates the measurements. |
RemoveAt | void | int index | Removes an item at a specified index.Args: int index - The index of the removed item. |
RemoveChild | dynamic | dynamic node | Removes a ListItem from the list of items inside element.Args: dynamic node - A ListItem element that is part of the list of items inside the element. |
Render | void | 'N/A' | Re-renders the Blazor Component. This method will make a full re-render. |
Select | void | object item | Selects an item from the listBox. Args: object item - A string, representing the value of the item or an HTML Element referencing an item from the list. |
StateHasChanged | void | 'N/A' | Refreshes the state and Re-renders the Blazor Component, if necessary. |
Unselect | void | string item | Unselects an item from the listBox. Args: string item - A string, representing the value of the item or an HTML Element referencing an item from the list |
Update | void | int index, object details | Updates an item from the listBox.Args: int index - The index of the item that is going to be updated.,object details - An object that contains the properties and their new values for the List item that should be updated. For example, label, value or selected attributes. |
Name | Type | Description | Event Detail |
OnBindingComplete | EventCallback<Event> | This event is triggered when listbox binding is completed. | N/A |
BindingCompleted | event ListBoxBindingCompletedEventHandler | This event is triggered when listbox binding is completed. | ListBoxBindingCompletedEventArgs |
OnChange | EventCallback<Event> | This event is triggered when selection is changed. | dynamic addedItems- An array of List items that have been selected., dynamic disabled- A flag indicating whether or not the item that caused the change event is disabled., int index- The index of the List item that triggered the event., string label- The label of the List item that triggered the event., dynamic removedItems- An array of List items that have been unselected before the event was fired., dynamic selected- The selected state of the List item that triggered the event. If an item was selected the value will be true and vice versa., dynamic value- The value of the List item that triggered the event. |
Changed | event ListBoxChangedEventHandler | This event is triggered when selection is changed. | ListBoxChangedEventArgs |
OnDragEnd | EventCallback<Event> | This event is triggered when an item is dropped. The dragging operation can be canceled by calling event.preventDefault() in the event handler function. | dynamic container- The List box that an item was dragged "to.", dynamic data- An object that contains data about the dragging operation like start position, start time, etc., dynamic item- The List item that was dragged., dynamic originalEvent- That original event that was fired., dynamic previousContainer- The List box that an item was dragged "from"., dynamic target- The event target. |
DragEnded | event ListBoxDragEndedEventHandler | This event is triggered when an item is dropped. The dragging operation can be canceled by calling event.preventDefault() in the event handler function. | ListBoxDragEndedEventArgs |
OnDragging | EventCallback<Event> | This event is triggered when a List item is being dragged. | dynamic data- An object that contains data about the dragging operation like start position, start time, etc., dynamic item- The List item that is being dragged. This is the item that has been clicked when initiating the drag operation, dynamic originalEvent- The original event that initiates the dragging operation. |
Dragging | event ListBoxDraggingEventHandler | This event is triggered when a List item is being dragged. | ListBoxDraggingEventArgs |
OnDragStart | EventCallback<Event> | This event is triggered when an item is dragged. The dragging operation can be canceled by calling event.preventDefault() in the event handler function. | dynamic container- The List box that an item was dragged "to.", dynamic data- An object that contains data about the dragging oepration like start position, start time, etc., dynamic item- The List item that was dragged., dynamic originalEvent- That original event that was fired., dynamic previousContainer- The List box that an item was dragged "from"., dynamic target- The event target. |
DragStarted | event ListBoxDragStartedEventHandler | This event is triggered when an item is dragged. The dragging operation can be canceled by calling event.preventDefault() in the event handler function. | ListBoxDragStartedEventArgs |
OnItemClick | EventCallback<Event> | This event is triggered when an item is clicked. | dynamic disabled- Indicates whether the List item that was clicked is disabled or not., int index- Indicates the index of the List item that was clicked., string label- The label of the List item that was clicked., dynamic selected- Indicates whether the List item that was clicked is selected or not., dynamic value- The value of the List item that was clicked. |
ItemClicked | event ListBoxItemClickedEventHandler | This event is triggered when an item is clicked. | ListBoxItemClickedEventArgs |
OnItemLabelChange | EventCallback<Event> | This event is triggered when an item has been edited. | dynamic selected- Indicates whether the List item is selected or not., dynamic disabled- Indicates whether the List item is disabled or not., int index- The index of the List item that was edited., string label- The label of the edited List item., dynamic value- The value of the List item that was edited. |
ItemLabelChanged | event ListBoxItemLabelChangedEventHandler | This event is triggered when an item has been edited. | ListBoxItemLabelChangedEventArgs |
OnScrollBottomReached | EventCallback<Event> | This event is triggered when user scrolls to the end of the list. | N/A |
ScrollBottomReached | event ListBoxScrollBottomReachedEventHandler | This event is triggered when user scrolls to the end of the list. | ListBoxScrollBottomReachedEventArgs |
OnScrollTopReached | EventCallback<Event> | This event is triggered when user scrolls to the beginning of the list. | N/A |
ScrollTopReached | event ListBoxScrollTopReachedEventHandler | This event is triggered when user scrolls to the beginning of the list. | ListBoxScrollTopReachedEventArgs |
OnSwipeleft | EventCallback<Event> | This event is triggered when the user swipes to the left, inside the listBox. | N/A |
SwipedLeft | event ListBoxSwipedLeftEventHandler | This event is triggered when the user swipes to the left, inside the listBox. | ListBoxSwipedLeftEventArgs |
OnSwiperight | EventCallback<Event> | This event is triggered when the user swipes to the right, inside the listBox. | N/A |
SwipeRight | event ListBoxSwipeRightEventHandler | This event is triggered when the user swipes to the right, inside the listBox. | ListBoxSwipeRightEventArgs |