Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxUpload.AllowCancel Property

Specifies whether users can cancel file upload.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[DefaultValue(true)]
[Parameter]
public bool AllowCancel { get; set; }

#Property Value

Type Default Description
Boolean true

true to allow users to cancel file upload; otherwise, false.

#Remarks

When file upload is in progress, users can click the cancel button to interrupt file upload. Handle the FileUploadAborted event to respond to this action. If multiple files are uploaded at once, users can click the common cancel button to cancel upload of all files.

Upload Cancel Button

To cancel the file upload in code, use the following methods:

Users can then reload the file whose upload was canceled. This action raises the FileReloaded event.

Upload Chunk Reload Button

To reload the file(s) in code, use the following methods:

Set the AllowCancel property to false to hide the cancel button during the upload process.

<DxUpload Name="myFile" UploadUrl="https://localhost:10000/api/Upload/Upload/"
          AllowCancel="false">
</DxUpload>

Upload Hidden Cancel Button

See Also