Answer:
To add label for EditTemplate field in Dialog editing use FloatLabelType property. By using this way, the PlaceHolder value will set as Label for that field. Here is the code snippet for your reference.
<SfGrid AllowPaging="true" DataSource="@Orders" Toolbar="@(new List<string>() { "Add", "Edit", "Delete", "Cancel", "Update" })"> <SfDropDownList ID="CustomerID" TValue="string" FloatLabelType="Syncfusion.Blazor.Inputs.FloatLabelType.Always" Placeholder="CustomerID" TItem="Countries" @bind-Value="((context as Order).CustomerID)" DataSource="@Names"> <DropDownListFieldSettings Value="Name">DropDownListFieldSettings> |
We can also define the label for a field in EditTemplate as like below.
<SfDropDownList ID="CustomerID" TValue="string" TItem="Countries" @bind-Value="((context as Order).CustomerID)" DataSource="@Names"> <DropDownListFieldSettings Value="Name">DropDownListFieldSettings> |
Find the sample to add labels on the edit template field in Blazor Data Grid here.