Trigger programatically double click of folder icon on clicking a customized button

Hi, 

I want to programatically double click folder icon on clicking a customized html tab. Please instruct on how we can achieve this.
(Have attached screenshot for further clarification. eg: If I click on DB tab(created in html) on top, it should double click DB folder programatically.)

Attachment: Capture_7b92e228.zip

1 Reply 1 reply marked as answer

SP Sowmiya Padmanaban Syncfusion Team June 26, 2020 01:44 PM UTC

Hi Saswati,  
  
Greetings from Syncfusion support. 
  
We have checked your attached screenshot and we assume that you are using EJ2 FileManager component. We suspect that your requirement is to navigate inside the folder without using double click that folder icon. You can achieve it by passing the folder name in Path property of FileManager component, it will navigate to the corresponding folder. 
  
Refer the below link to know more about the path property. 
 
  
Refer the below code snippet. When clicking the toolbar item, it will navigate the corresponding folder inside the FileManager component. 
  
@(Html.EJS().Toolbar("defaultToolbar") 
    .Width("600px").Clicked("click") 
    .Items(new List<ToolbarItem> { 
        new ToolbarItem { Text="DR"}, 
        new ToolbarItem { Text="DC"}, 
        new ToolbarItem { Text="HSA" }, 
    }) 
    .Render() 
) 
    <div style="margin-top:20px"> 
        @Html.EJS().FileManager("file").AjaxSettings(new Syncfusion.EJ2.FileManager.FileManagerAjaxSettings 
                     { 
                         Url = "/Home/FileOperations", 
                         GetImageUrl = "/Home/GetImage", 
                         UploadUrl = "/Home/Upload", 
                         DownloadUrl = "/Home/Download" 
                     }).NavigationPaneSettings(ls => ls.Visible(false)).Render() 
    </div> 
<script> 
    function click(args) { 
        var filemanager = document.getElementById("file").ej2_instances[0]; 
        // Navigate to the corresponding folder. 
        filemanager.path = "/" + args.item.text; 
    } 
</script> 
 
Refer the sample link below. 
 
  
To know more about the TreeView component, refer the sample link. 
  
  
  
  
Please let us know, if you need any further assistance. 
  
Regards,  
Sowmiya.P 



Marked as answer
Loader.
Up arrow icon