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.RemoveAllFiles() Method

In This Article

Removes all files from the file list.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
public void RemoveAllFiles()

#Remarks

The following code snippet allows users to upload multiple files and displays a button that removes all displayed files from the file list on click.

Razor
<DxUpload UploadMode=UploadMode.OnButtonClick 
          AllowMultiFileUpload="true"
          @ref="MyUpload"  >
</DxUpload>

<DxButton Text="Remove All Files" Click=OnButtonClick />

@code {
    DxUpload MyUpload { get; set; }

    void OnButtonClick(){
        MyUpload.RemoveAllFiles();
    }
}  

To remove the specified file or multiple files from the file list, use the RemoveFile or RemoveFiles method, respectively.

See Also