|
CardValidation = (TasksModel)context;
<EditForm Model="CardValidation" Context="FormCcontext" OnValidSubmit="OnSubmit">
<DataAnnotationsValidator />
<ValidationSummary />
<table>
<tbody>
…
<tr>
<td class="e-label">Summary</td>
<td>
<SfTextBox @ref="SummaryRef" CssClass="e-field" Multiline="true" @bind-Value="@CardValidation.Summary"></SfTextBox>
<ValidationMessage For="@(() => CardValidation.Summary)" />
</td>
</tr>
</tbody>
</table>
<div class="custom-footer">
<SfButton CssClass="e-primary e-flat" Content="Save"></SfButton>
</div>
</EditForm>
<style>
//to position the custom save button
.custom-footer {
text-align: right;
position: absolute;
width: 247px;
bottom: 15px;
}
//to hide default save button
.e-dialog .e-footer-content .e-dialog-add {
display: none;
}
</style>
public TasksModel CardValidation = new TasksModel();
private void OnSubmit()
{
KanbanRef.AddCard(CardValidation); //to add the card
KanbanRef.CloseDialog(); //to hide the dialog
} |