I have the following code, I get a standard prompt when renaming/deleting which prevents those actions from happening. Upload/View work great (also, new folder creation worked too when I had that enabled). The C# running on postback or not makes no difference.
"The selected file could not be deleted because the application did not have enough permissions. Please, contact the administrator."
<telerik:RadFileExplorer ID="RadFileExplorer1" runat="server" Height="150px" Width="450px" TreePaneWidth="122px" VisibleControls="Toolbar,ContextMenus,Grid" |
EnableCreateNewFolder="False" ExplorerMode="Default"></telerik:RadFileExplorer> |
protected void Page_Load(object sender, EventArgs e) |
{ |
if (!Page.IsPostBack) |
{ |
//CONFIGURE EVERYTHING |
RadFileExplorer1.Configuration.UploadPaths = new string[] { virtualPath }; |
RadFileExplorer1.Configuration.ViewPaths = new string[] { virtualPath }; |
RadFileExplorer1.Configuration.DeletePaths = new string[] { virtualPath }; |
RadFileExplorer1.InitialPath = virtualPath; |
//Remove some buttons |
RadToolBarButton backBtn = null; |
RadToolBarButton forwardBtn = null; |
foreach (RadToolBarButton btn in RadFileExplorer1.ToolBar.Items) |
{ |
if (btn.Value == "Back") |
backBtn = btn; |
else if (btn.Value == "Forward") |
forwardBtn = btn; |
} |
if (backBtn != null) |
RadFileExplorer1.ToolBar.Items.Remove(backBtn); |
if (forwardBtn != null) |
RadFileExplorer1.ToolBar.Items.Remove(forwardBtn); |
//set the props for the upload control |
SetUploadProperties(); |
RadFileExplorer1.Grid.MasterTableView.NoDetailRecordsText = "Upload files using right mouse click or the upload button."; |
} |
} |
private void SetUploadProperties() |
{ |
string[] extensionsSearch = new string[XMLFileExtensions.AllowedFileTypes.Count]; |
for (int x = 0; x < XMLFileExtensions.AllowedFileTypes.Count; x++) |
{ |
extensionsSearch[x] = "*." + XMLFileExtensions.AllowedFileTypes[x].FileExtension; |
} |
RadFileExplorer1.Configuration.SearchPatterns = extensionsSearch; |
RadFileExplorer1.Configuration.MaxUploadFileSize = 10485760; |
} |