How can I add a watch for the number of files

Hello,

Actually, I want to add a watch for the number of files in the file manager.

Thanks


1 Reply 1 reply marked as answer

SS Sharon Sanchez Selvaraj Syncfusion Team May 24, 2021 12:13 PM UTC

Hi Omar, 

Greetings from Syncfusion Support. 

We have checked with your query. Inorder to check with the number of files in the FileManager component, you can obtain the details through success event. This gets triggered after each success of an AJAX request. 

Refer to the code block below where the details were obtained. 

  onSuccess: function (args) {  
var span = document.createElement("span"); 
      var element = document.querySelector(".element"); 
      if (element.querySelector("span")) { 
        element.querySelector("span").remove(); 
      } 
      span.innerText = args.result.files.length; 
      element.append(span); 
    }, 


Refer to the sample. 


Please get back to us if you need further assistance. 

Regards, 

Sharon Sanchez S. 


Marked as answer
Loader.
Up arrow icon