From 3770f4682b5c42b04e81150cf3ff4a82f5d56873 Mon Sep 17 00:00:00 2001 From: georgedautov Date: Thu, 17 Jul 2025 17:10:20 +0300 Subject: [PATCH] docs(DropDownList): Change basic usage to live example --- components/dropdownlist/overview.md | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/components/dropdownlist/overview.md b/components/dropdownlist/overview.md index d9c212ee2..a9bf18ec6 100644 --- a/components/dropdownlist/overview.md +++ b/components/dropdownlist/overview.md @@ -25,31 +25,7 @@ The Blazor DropDownList component allows the user to choose an option from a pre >caption DropDownList [data binding](slug:components/dropdownlist/databind), two-way value binding, and main features -````RAZOR -Selected value: @selectedValue -
- - - - -@code { - //in a real case, the model is usually in a separate file - //the model type and value field type must be provided to the dropdpownlist - public class MyDdlModel - { - public int MyValueField { get; set; } - public string MyTextField { get; set; } - } - - int selectedValue { get; set; } = 3; - - IEnumerable myDdlData = Enumerable.Range(1, 20).Select(x => new MyDdlModel { MyTextField = "item " + x, MyValueField = x }); -} -```` - ->caption The rendered DropDownList component from the code snippet above: - -![Blazor DropDown List component](images/dropdownlist-basic-screenshot.jpg) + ## Data Binding