Skip to content

Commit 2a84552

Browse files
committed
docs(DropDownList): Change basic usage to live example
1 parent c473d09 commit 2a84552

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

components/dropdownlist/overview.md

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -25,27 +25,7 @@ The Blazor DropDownList component allows the user to choose an option from a pre
2525

2626
>caption DropDownList [data binding](slug:components/dropdownlist/databind), two-way value binding, and main features
2727
28-
````RAZOR
29-
Selected value: @selectedValue
30-
<br />
31-
32-
<TelerikDropDownList Data="@myDdlData" TextField="MyTextField" ValueField="MyValueField" @bind-Value="selectedValue">
33-
</TelerikDropDownList>
34-
35-
@code {
36-
//in a real case, the model is usually in a separate file
37-
//the model type and value field type must be provided to the dropdpownlist
38-
public class MyDdlModel
39-
{
40-
public int MyValueField { get; set; }
41-
public string MyTextField { get; set; }
42-
}
43-
44-
int selectedValue { get; set; } = 3;
45-
46-
IEnumerable<MyDdlModel> myDdlData = Enumerable.Range(1, 20).Select(x => new MyDdlModel { MyTextField = "item " + x, MyValueField = x });
47-
}
48-
````
28+
<demo metaUrl="client/dropdownlist/overview/" height="420"></demo>
4929

5030
>caption The rendered DropDownList component from the code snippet above:
5131

0 commit comments

Comments
 (0)