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

Unzip Doesnt work...

0 Answers 61 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Corey
Top achievements
Rank 1
Corey asked on 23 Mar 2012, 07:55 PM
i have added the unzip command to the fileexplorer but it will not extract the files .. here is the code i am using.
function OnGridContextItemClicked(oGridMenu, args) {
           var menuItemText = args.get_item().get_text();
           if (menuItemText == "UnZip") {// 'UnZip' command
               var oExplorer = $find("<%= rfeStorage.ClientID %>");
               var oAjaxPanel = $find("<%= RadAjaxPanel1.ClientID %>");
 
               var selectedItem = oExplorer.get_selectedItem();
               if (selectedItem.get_extension() == "zip") {
                   //var itemExt = ; // get the extension of the current item 
 
                   var itemPath = selectedItem.get_path(); // get the path of the current item 
                   oAjaxPanel.ajaxRequest(itemPath); // Call the RadAjaxPanel1_AjaxRequest function on the server ; 
                    
                   
               }
               else {
                   alert("Please, select a ZIP file");
               
           }
       }
       //]]>
   </script>
   RadMenuItem item = new RadMenuItem("UnZip");
                item.PostBack = false;
                item.Value = "CustomValue";
 
                rfeStorage.GridContextMenu.Items.Add(item);
                rfeStorage.GridContextMenu.OnClientItemClicked = "OnGridContextItemClicked";
}
 
   protected void RadAjaxPanel1_AjaxRequest(object sender, AjaxRequestEventArgs e)
        {
            string path = e.Argument;
            LblAjaxPanel.Text = path;
        }
Please write me back asap. Thanks in advance
*revision*
I realized i dont have the function for the unzipping process can someone help me with that! please!

No answers yet. Maybe you can help?

Tags
FileExplorer
Asked by
Corey
Top achievements
Rank 1
Share this question
or