Disable/Hide "Remove" icon after file being uploaded - RadAsyncUpload

0 Answers 127 Views
Ajax AsyncUpload UI for ASP.NET AJAX in ASP.NET MVC
Neil
Top achievements
Rank 2
Neil asked on 20 Apr 2023, 08:55 PM | edited on 20 Apr 2023, 08:56 PM

Hi All,

I am trying to provide read-only access to certain users. This user should not be able to remove the uploaded file. 

How do I hide/disable the remove button from server side? 

 

 

Rumen
Telerik team
commented on 25 Apr 2023, 12:13 PM

Hi Neil,

The scenario is discussed in the following forum thread: RadAsyncUpload: How can I hide buttons?

You can hide the remove button either:

  • by CSS

    <style>
        .ruRemove { display: none; }
    </style>
  • or via JavaScript

    <script>
        function OnClientFilesUploaded(sender, args) {
            $telerik.$(".ruRemove").hide();
        }
    </script>
    
    <telerik:RadAsyncUpload ID="RadAsyncUpload1" OnClientFilesUploaded="OnClientFilesUploaded" runat="server"></telerik:RadAsyncUpload>

If you need a server solution, you can register the JavaScript via the RegisterStartupScript server method of the ScriptManager - Execute Custom Javascript Code after an AJAX Update.

No answers yet. Maybe you can help?

Tags
Ajax AsyncUpload UI for ASP.NET AJAX in ASP.NET MVC
Asked by
Neil
Top achievements
Rank 2
Share this question
or