Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
146620 | Aug 11,2019 02:54 AM UTC | Aug 12,2019 11:39 AM UTC | Blazor | 1 |
![]() |
Tags: Dropdown List |
<EjsDropDownList TValue="string" ID="ddlProjectTypes" Index="@SelectedProjectTypeIndex" CssClass="modal-edit-project-data e-textbox right" DataSource="ProjectTypes" Placeholder="Select Project Type">
<DropDownListEvents OnValueSelect="OnProjectTypeChange" TValue="string"></DropDownListEvents>
<DropDownListFieldSettings Text="Text" Value="ID"></DropDownListFieldSettings>
</EjsDropDownList>
@code {
public int SelectedProjectTypeIndex { get; set; } = 2;
public class DropDownData
{
public string ID { get; set; }
public string Text { get; set; }
}
List<DropDownData> ProjectTypes = new List<DropDownData> {
new DropDownData() { ID= Guid.NewGuid().ToString(), Text= "American Football" },
new DropDownData() { ID= Guid.NewGuid().ToString(), Text= "Badminton" },
new DropDownData() { ID= Guid.NewGuid().ToString(), Text= "Basketball" },
new DropDownData() { ID= Guid.NewGuid().ToString(), Text= "Cricket" },
new DropDownData() { ID= Guid.NewGuid().ToString(), Text= "Football" },
new DropDownData() { ID= Guid.NewGuid().ToString(), Text= "Golf" },
new DropDownData() { ID= Guid.NewGuid().ToString(), Text= "Hockey" },
new DropDownData() { ID= Guid.NewGuid().ToString(), Text= "Rugby"},
new DropDownData() { ID= Guid.NewGuid().ToString(), Text= "Snooker" },
new DropDownData() { ID= Guid.NewGuid().ToString(), Text= "Tennis"},
};
}
|
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.