-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathIndex.razor
34 lines (29 loc) · 935 Bytes
/
Index.razor
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
@page "/"
<div class="control">
<SfDropDownList DataSource="@Games" TValue="string" TItem="GamesData" Placeholder="Select a game"
PopupWidth="250px" PopupHeight="400px">
<DropDownListFieldSettings Text="Name" Value="ID"></DropDownListFieldSettings>
</SfDropDownList>
</div>
<style>
.control {
width: 250px;
margin: 10%;
}
</style>
@code {
public class GamesData
{
public string ID { get; set; }
public string Name { get; set; }
}
List<GamesData> Games = new List<GamesData> {
new GamesData() { ID= "Game1", Name= "Badminton" },
new GamesData() { ID= "Game2", Name= "Basketball" },
new GamesData() { ID= "Game3", Name= "Cricket" },
new GamesData() { ID= "Game4", Name= "Football" },
new GamesData() { ID= "Game5", Name= "Golf" },
new GamesData() { ID= "Game6", Name= "Hockey" },
new GamesData() { ID= "Game7", Name= "Tennis"},
};
}