14
14
CrossDomain =true >
15
15
</EjsDataManager >
16
16
</EjsDropDownList >
17
+
18
+ // List data binding
19
+ @* <EjsDropDownList DataSource="@Games" TValue="string" TItem="GamesData" Placeholder="Select a game"
20
+ PopupWidth="250px" PopupHeight="400px">
21
+ <DropDownListFieldSettings Text="Name" Value="ID">
22
+ </DropDownListFieldSettings>
23
+ </EjsDropDownList> *@
17
24
</div >
18
25
19
26
<style >
24
31
</style >
25
32
26
33
@code {
27
- public class EmployeeData {
34
+
35
+ public class EmployeeData {
28
36
public string FirstName { get ; set ; }
29
37
public string EmployeeID { get ; set ; }
30
38
public string Designation { get ; set ; }
31
39
public string Country { get ; set ; }
32
40
}
33
- }
41
+
42
+ // Model class for List data source
43
+ @* public class GamesData
44
+ {
45
+ public string ID { get; set; }
46
+ public string Name { get; set; }
47
+ }
48
+ List<GamesData> Games = new List<GamesData> {
49
+ new GamesData() { ID= "Game1", Name= "Badminton" },
50
+ new GamesData() { ID= "Game2", Name= "Basketball" },
51
+ new GamesData() { ID= "Game3", Name= "Cricket" },
52
+ new GamesData() { ID= "Game4", Name= "Football" },
53
+ new GamesData() { ID= "Game5", Name= "Golf" },
54
+ new GamesData() { ID= "Game6", Name= "Hockey" },
55
+ new GamesData() { ID= "Game7", Name= "Tennis"},
56
+ }; *@
57
+
58
+ }
0 commit comments