Fields.UpdateAllAsync(Boolean) Method
Updates every field in the current sub-document or in all sub-documents.
Namespace: DevExpress.Blazor.RichEdit
Assembly: DevExpress.Blazor.RichEdit.v21.2.dll
NuGet Package: DevExpress.Blazor.RichEdit
Declaration
public ValueTask UpdateAllAsync(
bool doInAllSubDocuments = false
)
Optional Parameters
Name | Type | Default | Description |
---|---|---|---|
doInAllSubDocuments | Boolean | False | true to update fields in all sub-documents; false to update fields in the current sub-document only. |
Returns
Type | Description |
---|---|
ValueTask | A structure that stores an awaitable result of an asynchronous operation. |
Remarks
Update fields to calculate and display the field results.
The following example shows how you can update every field in all sub-documents:
<DxRichEdit @ref="@richEdit" />
@code {
DxRichEdit richEdit;
Document documentAPI;
@* ... *@
/* Surround the code that contains an asynchronous operation with a try-catch block to handle
the OperationCanceledException. This exception is thrown when an asynchronous operation is cancelled. */
try {
documentAPI = richEdit.DocumentAPI;
@* ... *@
await documentAPI.Fields.UpdateAllAsync(true);
@* ... *@
}
catch (OperationCanceledException e) {
Console.WriteLine($"{nameof(OperationCanceledException)} thrown with message: {e.Message}");
}
}
The UpdateAsync(Field) method allows you to update a field.
See Also