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

DocumentManager / alone and return path

2 Answers 67 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Pierre
Top achievements
Rank 1
Pierre asked on 16 Oct 2008, 03:26 PM
Hi,

I have 2 new problems with the last DocumentManager and the new version. I use to return one path in one ItextControl working before this realease.

1/ When I select my document I not have anymore the returned path. But working before new Q2. No using Documents properties.

2/ I can Use Search Paterns like {"*.flv,*.wmf"}
dialogParameters1.SearchPatterns = new string[] { "*.*" };//{"*.avi,*.wmf,*.flv"};

Could you help me to fix the first point, Please.
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ImageNewsVideo.ascx.cs" Inherits="ImageCaller" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>   
 
 
    <script type="text/javascript">  
    var currentTextBoxID;    
          
    function ImageManagerFunction(sender, args)    
    {    
                 
        var selectedItem = args.SelectedItem;    
        var resultImageObject = args.Result;    
            
        var txt = $get(currentTextBoxID);    
        txt.value = selectedItem.getPath();  
          
    }            
    </script> 
 
    <asp:TextBox ID="LinkImage" runat="server"></asp:TextBox> 
    <telerik:dialogopener runat="server" id="DialogOpener1" >    
      
    </telerik:dialogopener> 
         
      
    <button onclick="currentTextBoxID='<%= LinkImage.ClientID %>';$find('<%= DialogOpener1.ClientID %>').open('DocumentManager');return false;">Select</button> 



protected void Page_Load(object sender, EventArgs e)  
    {  
 
       
                    // set the view path dinamically to this path  
                    FileManagerDialogParameters dialogParameters1 = new FileManagerDialogParameters();  
                    dialogParameters1.ViewPaths = new string[] { "~/contents/infoVideos/" };  
                    dialogParameters1.UploadPaths = new string[] { "~/contents/infoVideos/" };  
                    dialogParameters1.DeletePaths = new string[] { "~/contents/infoVideos/" };  
                    dialogParameters1.MaxUploadFileSize = 5000000;  
                    dialogParameters1.SearchPatterns = new string[] { "*.*" };//{"*.avi,*.wmf,*.flv"};  
                      
                    DialogDefinition DocumentManager = new DialogDefinition(typeof(DocumentManagerDialog), dialogParameters1);  
                    DocumentManager.ClientCallbackFunction = "DocumentManagerFunction";  
                    DocumentManager.Width = Unit.Pixel(694);  
                    DocumentManager.Height = Unit.Pixel(440);  
         
                    DialogOpener1.DialogDefinitions.Add("DocumentManager", DocumentManager);  
                 
      
         
      
    } 

2 Answers, 1 is accepted

Sort by
0
Pierre
Top achievements
Rank 1
answered on 16 Oct 2008, 03:33 PM
Oops. First is fixed , mistake script function name. See second issue plz.
0
Rumen
Telerik team
answered on 21 Oct 2008, 08:34 AM
Hi Pierre,

The correct syntax for adding items to the SearchPatterns array is to wrap each item in quotes, e.g.

dialogParameters1.SearchPatterns = new string[] { "*.flv","*.wmf" };

Best regards,
Rumen
the Telerik team

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