Using RADTOOLBAR Custom Button in RADFILEEXPLORER server-side

2 posts, 0 answers
  1. Ajay
    Ajay avatar
    66 posts
    Member since:
    May 2009

    Posted 05 Oct 2009 Link to this post

    Hi Telerik !

    I using an RADFILEEXPLORER in my project.
    I have added an custom button named "ARCHIVE" (that I want it to work like Iam archiving an folder/file) using an RadToolBarButton class.

    Since all your methods to MOVE, CREATE, DELETE file & directory are OVERRIDEN methods in CustomFileSystemProvider.cs.
    i.e. For example : For COPY DIRECTORY method :-

    public override string CopyDirectory(string virtualSourcePath, string virtualDestPath)

    Please suggest how to implement the same feature for "ARCHIVE" folder/file.

    How to get the parameters for the above mentioned method in case of "ARCHIVE FILE".

    Upto now , I have proceded as :-

        protected void Page_Load(object sender, EventArgs e)  
            string eventArg = Request["__EVENTARGUMENT"];  
            if (eventArg == "Archive")  
            string DocumentPath = ConfigurationManager.AppSettings["DocumentPath"].ToString() + "SharedDocuments\\";  
            string[] viewPaths = new string[] { DocumentPath };  
            string[] uploadPaths = new string[] { DocumentPath };  
            string[] deletePaths = new string[] { DocumentPath };  
            DocumentsRadFileExplorer.Configuration.ViewPaths = viewPaths;  
            DocumentsRadFileExplorer.Configuration.UploadPaths = uploadPaths;  
            DocumentsRadFileExplorer.Configuration.DeletePaths = deletePaths;  
            //DocumentsRadFileExplorer.Configuration.SearchPatterns = new string[] { "*.txt" };  
            DocumentsRadFileExplorer.Configuration.ContentProviderTypeName = typeof(CustomFileSystemProvider).AssemblyQualifiedName;  
            if (!IsPostBack)  
                RadToolBarButton customButton = new RadToolBarButton("Archive");  
                customButton.CssClass = "test_button";  
                customButton.Value = "Archive";  
                customButton.CommandName = "Archive";  
                //context menu item  
                RadMenuItem customMenuOption = new RadMenuItem("Archive");  
                customMenuOption.Value = "custom_Menu";  
                //if you want the custom context menu item to be visible in the grid as well  
                //DocumentsRadFileExplorer.ToolBar.ButtonClick += new RadToolBarEventHandler(toolBar_ButtonClick);  
        public void Archive()  
            string val = DocumentsRadFileExplorer.TreeView.SelectedNode.Value;  

    Please suggest that how can I pass the PARAMETERS that I have made STORED PROCEDURE at application end.

    Please help ! 
  2. Lini
    Lini avatar
    2144 posts

    Posted 08 Oct 2009 Link to this post

    Hello Ajay,

    You can use a ajax panel with a button inside and simulate a click on this button when the user clicks the archive command on the toolbar. I am attaching a simple page that demonstrates how to do that.

    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. DevCraft R3 2016 release webinar banner
Back to Top