|
<SfGrid DataSource="@Orders" AllowPaging="true" @ref="Grid" Toolbar="@(new string[] { "Add", "Edit", "Delete", "Cancel", "Update" })" Height="315">
<GridEvents OnActionBegin="ActionBeginHandler" OnActionComplete="@ActionCompleteHandler" TValue="Order"></GridEvents>
<GridEditSettings AllowAdding="true" AllowEditing="true" AllowDeleting="true" Mode="EditMode.Dialog">
<Template>
@{
. . .
. . .
<div class="form-group col-md-6">
<label>Rich Text Editor Inside the Grid Edit Template</label>
<SfRichTextEditor @ref="rteObj" EnableXhtml="true" Placeholder="Enter Value">
</SfRichTextEditor>
</div>
</div>
</div>
}
</Template>
</GridEditSettings>
</SfGrid>
@code{
SfRichTextEditor rteObj;
public async Task ActionCompleteHandler(ActionEventArgs<Order> args)
{
// To check if the ‘OnActionComplete’ is called when editing the grid data.
if (args.RequestType == Syncfusion.Blazor.Grids.Action.BeginEdit)
{
// Please increase or decrease the delay depending on the application load to render properly.
await Task.Delay(1100);
await this.rteObj.RefreshUI();
}
}
} |
|
<SfGrid DataSource="@Orders" AllowPaging="true" @ref="Grid" Toolbar="@(new string[] { "Add", "Edit", "Delete", "Cancel", "Update" })" Height="315">
<GridEvents OnActionBegin="ActionBeginHandler" TValue="Order" ></GridEvents>
<GridEditSettings AllowAdding="true" AllowEditing="true" AllowDeleting="true" Mode="EditMode.Dialog">
<Template>
. . .
. . .
<div class="form-group col-md-6">
<label>Rich Text Editor Inside the Grid Edit Template</label>
<SfRichTextEditor @ref="rteObj" EnableXhtml="true" Placeholder="Enter Value">
<RichTextEditorEvents Created="@Created"></RichTextEditorEvents>
</SfRichTextEditor>
</div>
</div>
</div>
}
</Template>
</GridEditSettings>
. . .
</SfGrid>
@code{
SfRichTextEditor rteObj;
public void Created()
{
this.rteObj.RefreshUI();
}
} |