Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
146947 | Aug 26,2019 04:04 PM UTC | Oct 6,2019 06:32 PM UTC | Blazor | 4 |
![]() |
Tags: In-place Editor |
Index.razor
public int? Keys { get; set; }
|
<EjsInPlaceEditor @ref="@edtFamilyId" @ref:suppressField
Name="FamilyId"
TValue="string"
Type="InputType.ComboBox"
EmptyText="@InitialEmptyText"
Model="@FamilyModel">
<InPlaceEditorEvents TValue="string" OnActionBegin="OnActionBegin" OnActionSuccess="OnActionSuccess" />
</EjsInPlaceEditor>
private static List<DataModel> ComboData = new List<DataModel>() {
new DataModel { Keys = 0, Name = "-" },
new DataModel { Keys = 1, Name = "Adams" },
new DataModel { Keys = 2, Name = "Brown" },
new DataModel { Keys = 3, Name = "Smith" },
new DataModel { Keys = 4, Name = "Jones" }
};
public static Person person = new Person() { FamilyId = 2 };
public string InitialEmptyText = (ComboData.Where(i => i.Keys.Equals(person.FamilyId)).FirstOrDefault()).Name;
private object FirstNameModel = new { placeholder = "Enter the name" };
private object FamilyModel = new
{
placeholder = "Select value",
dataSource = ComboData,
fields = new ComboBoxFieldSettings() { Text = "Name", Value = "Keys" },
value = person.FamilyId
};
|
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.