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

How to disable Delete, Remane, and New Folder in FileExplorer

1 Answer 166 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
stuart
Top achievements
Rank 1
stuart asked on 06 Feb 2009, 12:24 AM
I posted to the treeView forum because I cannot find an area to post questions for the FileExplorer control.

I need to be able to remove the Disable, Rename, and New folder options in the FileExplorer control (or hide that menu all together). I pretty much need it read only. My only exception is I need users to be able to download the files. About a month ago, one of your programmers was able to supply me with the script to download the files upon clicking them so that is taken care of. Below is the existing code:

<%

@ Page Title="" Language="C#" MasterPageFile="~/Employee_MasterPage.master" AutoEventWireup="true" CodeFile="Forms.aspx.cs" Inherits="Secure_Employee_Login_Office_Staff_Area_Forms" %>

 

<%

@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>

 

<

 

asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

 

</

 

asp:Content>

 

<

 

asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

 

 

 

<tr>

 

 

<td width="730">

 

 

<div align="left">

 

 

<table width="100%" border="0" cellspacing="0" cellpadding="0">

 

 

<tr>

 

 

<td width="20"></td>

 

 

<td width="675px"><font size="3" color="black"><font size="2" face="Helvetica, Geneva, Arial, SunSans-Regular, sans-serif"><b>Note Regarding Change in Insurance Benefits:<br>

 

 

</b>Changes in employee benefits may only be done during Open Enrollment (in November with an effective date of December 1st) <u>or within 30 days of a Qualifying Event</u>. &nbsp;A Qualifying Event is defined as one of the following events:</font></font><ul>

 

 

<li><font size="3" color="black"><font size="2" face="Helvetica, Geneva, Arial, SunSans-Regular, sans-serif">Marriage or divorce;</font></font><li><font size="3" color="black"><font size="2" face="Helvetica, Geneva, Arial, SunSans-Regular, sans-serif">Birth/adoption of a child;</font></font><li><font size="3" color="black"><font size="2" face="Helvetica, Geneva, Arial, SunSans-Regular, sans-serif">Dependent child ineligibility due to overage status;</font></font><li><font size="3" color="black"><font size="2" face="Helvetica, Geneva, Arial, SunSans-Regular, sans-serif">Death of a child or spouse/domestic partner;</font></font><li><font size="3" color="black"><font size="2" face="Helvetica, Geneva, Arial, SunSans-Regular, sans-serif">Loss of coverage through spouse/domestic partner.</font></font></ul>

 

 

<p><font size="2" color="black" face="Helvetica, Geneva, Arial, SunSans-Regular, sans-serif">To make a change in your insurance benefits (health, vision and/or dental), please contact . &nbsp; <br>

 

 

<br>

 

 

</p> </font><script type="text/javascript">

 

 

function OnClientItemClickHandler(sender, eventArgs) {

 

window.open(eventArgs.get_path());

}

</

 

script>

 

 

<telerik:RadFileExplorer ID="RadFileExplorer1" Runat="server" Configuration-ViewPaths="~/secure/employee_login/doctors_area/forms_download" OnClientItemClick="OnClientItemClickHandler" >

 

<

 

Configuration SearchPatterns="*.*" viewpaths="~/secure/employee_login/doctors_area/forms_download"></Configuration>

 

 

</telerik:RadFileExplorer>

 

 

<p>

 

 

</p>

 

 

</td><td width="20"></td></table>

 

 

</asp:Content>

 

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 09 Feb 2009, 09:31 AM
Hi Stuart,

You can disable the context menu of RadFileExplorer by setting the following css class:

    <style> 
    .RadMenu.RadMenu_Default.rmContextMenu.RadMenu_Default_Context  
    { 
        displaynone !important; 
    } 
    </style> 

I tested this solution with the Default skin and the latest Q3 SP2 version of RadControls for ASP.NET AJAX. For your convenience I have attached my test page.

Kind regards,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
TreeView
Asked by
stuart
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or