Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
146435 | Aug 3,2019 08:46 AM UTC | Jul 17,2020 01:47 PM UTC | Blazor | 4 |
![]() |
Tags: Dropdown List |
@using Syncfusion.EJ2.Blazor.DropDowns
<EjsDropDownList Placeholder="NewshaCategory" ID="NewshaCategory" TValue="string" EnableRtl="true" AllowFiltering=true IgnoreAccent=true DataSource="@NewshaCategoriesList">
<DropDownListFieldSettings Value="ID" Text="Text"></DropDownListFieldSettings>
<Syncfusion.EJ2.Blazor.DropDowns.DropDownListEvents TValue="string" ValueChange="NewshaCategorySelected"></Syncfusion.EJ2.Blazor.DropDowns.DropDownListEvents>
</EjsDropDownList>
<p>@Description1</p>
@code{
public class Games
{
public string ID { get; set; }
public string Text { get; set; }
}
List<Games> NewshaCategoriesList = new List<Games> {
new Games() { ID= "Game1", Text= "American Football" },
new Games() { ID= "Game2", Text= "Badminton" },
new Games() { ID= "Game3", Text= "Basketball" },
new Games() { ID= "Game4", Text= "Cricket" },
new Games() { ID= "Game5", Text= "Football" },
new Games() { ID= "Game6", Text= "Golf" },
new Games() { ID= "Game7", Text= "Hockey" },
new Games() { ID= "Game8", Text= "Rugby"},
new Games() { ID= "Game9", Text= "Snooker" },
new Games() { ID= "Game10", Text= "Tennis"},
};
public string Description1 { get; set; }
public void NewshaCategorySelected(Syncfusion.EJ2.Blazor.DropDowns.ChangeEventArgs<string> args)
{
Description1 = "hello";
}
} |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.