# MultiSelect Item Selection

This article discusses how to pre-select existing MultiSelect items and how to enable users to select all items with a single action.

## Pre-Select Items

On page load, the MultiSelect will render the selected items in the order in which these items appear in the `Data` collection. To preserve the order of the initially selected items, [sort the data to match the selected items order](https://www.telerik.com/blazor-ui/documentation/knowledge-base/multiselect-selected-items-order).

> caption Pre-select MultiSelect items for the user

<demo metaUrl="client/multiselect/pre-select-items/example-1/" height="420"></demo>

## Select All Items

Telerik UI for Blazor 14.1.0 and newer versions allow users to select or deselect all rendered items. To enable the feature, set the `EnableSelectAll` parameter to `true`:

```RAZOR.skip-repl
<TelerikMultiSelect EnableSelectAll="true" />
```

When `EnableSelectAll` is `true`, the MultiSelect appearance and behavior also depend on the [`TagMode`](https://www.telerik.com/blazor-ui/documentation/components/multiselect/tag-mode), [`MaxAllowedTags`](https://www.telerik.com/blazor-ui/documentation/components/multiselect/tag-mode#summarized-tags-based-on-the-number-of-selections), and [`EnableCheckBoxes`](https://www.telerik.com/blazor-ui/documentation/components/multiselect/overview#checkboxes) settings.

Clicking the **Select All** toggle fires the [`OnSelectAll` event](https://www.telerik.com/blazor-ui/documentation/components/multiselect/events#onselectall).

The Select All functionality applies only to the currently rendered items, which means:

* The state of the **Select All** toggle button or tri-state checkbox depends on whether all, some, or none of the currently rendered items are selected.
* If [MultiSelect filtering](https://www.telerik.com/blazor-ui/documentation/components/multiselect/filter) is active, users select or deselect only the filtered items. The selection state of all other items remains unchanged.
* If [MultiSelect virtual scrolling](https://www.telerik.com/blazor-ui/documentation/components/multiselect/virtualization) is enabled, users select or deselect the currently rendered chunk of items. Their number depends on the `PageSize`. Scrolling does not affect the selected items. To select all items in the data source in virtual scenarios, use the [`OnSelectAll` event and set `args.Items` to all data items](https://www.telerik.com/blazor-ui/documentation/components/multiselect/virtualization#remote-data-example).

> caption Using MultiSelect SelectAll parameter and OnSelectAll event

<demo metaUrl="client/multiselect/pre-select-items/example-2/" height="420"></demo>

## See Also

* [MultiSelect Tag Mode](https://www.telerik.com/blazor-ui/documentation/components/multiselect/tag-mode)
* [MultiSelect CheckBoxes](https://www.telerik.com/blazor-ui/documentation/knowledge-base/multiselect-checkbox-in-dropdown)
