This is a migrated thread and some comments may be shown as answers.

Hide some folder of the grid data in Rad fileexplorer

1 Answer 148 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Neha
Top achievements
Rank 1
Neha asked on 13 May 2014, 05:10 AM
Hello ,

I am using RadFile explorer telerik control for upload file but in this when the rad fileexplorer is load i have made one method "OnClientload" so in this method I want to side some folder of the grid data at the time of load and disable the pointer events on that folder also so teh user not able to click on that folder.

For Example:
          function OnClientLoad(explorer) {
           
               var radExplorer = $find("RF1");
              var getGrid = radExplorer.get_grid();
              var table = getGrid.get_masterTableView();
              var rows = table.get_dataItems();
            
              for (var i = 0; i < rows.length; i++) {
                  var menuItem = rows[i];
                  if (menuItem.get_dataItem().Name == "catalog") {
                      $('.rgRow div:contains("catalog")').css('pointerEvents', 'auto');
                      $('.rgRow div:contains("catalog")').css('opacity', 0.4);
                  }}}
                
but in this code the pointer events class is not working on the folde


             
             
         

1 Answer, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 14 May 2014, 04:20 PM
Hi Neha,

The click events of the FileExplorer's RadGrid cannot be controlled with the standard pointer events. In case you want to make a specific rowin the gird unselectable, a possible way to achieve it could be to deleselect it in the FileExplorer's OnClientItemSelected event handler. For example:
<telerik:RadFileExplorer runat="server" ID="RF1" OnClientItemSelected="OnClientItemSelected">
    <Configuration ViewPaths="~/Images" UploadPaths="~/Images" DeletePaths="~/Images" />
</telerik:RadFileExplorer>
 
<script>
    function OnClientItemSelected(explorer, args) {
        if (args.get_item().get_name() == "catalog") {
            explorer.get_grid().get_selectedItems()[0].set_selected(false);
        }
    }
</script>

Nevertheless, I will suggest you to take a look at the approach from this help article which will hide the desired folders both from the Grid and the TreeView of the control: Hide certain directories and files in RadFileExplorer

Regards,
Vessy
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
FileExplorer
Asked by
Neha
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Share this question
or