# Events selector

This tutorial demonstrates how to add a *Events* selector in a widget's designer view.

> info **PREREQUISITES**: You created at least one *event* item, so that the selector can use it. For more information, see [Events](https://www.progress.com/documentation/sitefinity-cms/events).

To add an *Events* selector, in your `DesignerView.<YourView>.cshtml` file, place the one of the following tags anywhere in the HTML code.

Single item selection:

```Razor
<sf-list-selector sf-event-selector sf-multiselect="false" sf-sortable="true"
                                 sf-provider="properties.ProviderName.PropertyValue"
                                 sf-selected-item-id="properties.SelectedItemId.PropertyValue" 
                                 sf-selected-item="properties.SelectedItem.PropertyValue"></sf-list-selector>
```

Multiple items selection:

```Razor
<sf-list-selector sf-event-selector sf-multiselect="true" sf-sortable="true"
                                sf-provider="properties.ProviderName.PropertyValue"
                                sf-selected-ids="properties.SelectedItemIds.PropertyValue" 
                                sf-selected-items="properties.SelectedItems.PropertyValue"></sf-list-selector>
```

The values of the attributes are scope properties that you define in the MVC widget controller.

<table>
<tbody>
<tr>
<td>

<strong>Attribute</strong>

</td>
<td>

<strong>Description</strong>

</td>
</tr>
<tr>
<td>

`sf-selected-item-id`

</td>
<td>

Single select only. Stores the ID of the selected item. 

</td>
</tr>
<tr>
<td>

`sf-selected-item`

</td>
<td>

Single select only. Stores the serialized information of the selected item.

</td>
</tr>
<tr>
<td>

`sf-selected-ids`

</td>
<td>

Multi select only. Stores the IDs of the selected items. 

</td>
</tr>
<tr>
<td>

`sf-selected-items`

</td>
<td>

Multi select only. Stores the serialized information of the selected items. 

</td>
</tr>
<tr>
<td>

`sf-provider`

</td>
<td>

Configures the provider to use when retrieving the items to display.

</td>
</tr>
<tr>
<td>

`sf-master`

</td>
<td>

Defines whether the selector displays events and their statuses, such as <em>Draft</em>, <em>Locked</em>, and so on, or only published events items. To configure the <em>Events</em> selector to display master items, that is, all events, independently of their status, set the `sf-master="true"`. By default, the selector displays only live events and the value of the `sf-master` is set to `false`.

> info **NOTE**: When you set the `sf-master="true"`, the selectors lists the items but does not display their status.

</td>
</tr>
</tbody>
</table>
