server-side programming not working

6 posts, 0 answers
  1. Roland Koops
    Roland Koops avatar
    3 posts
    Member since:
    Aug 2007

    Posted 09 Apr 2010 Link to this post

     

    If I specify viewpaths, uploadpaths, deletepaths, and SearchPatterns properties in the ASPX file, then the control works, i.e., the SearchPatterns are applied and I can upload files.

    If I specify viewpaths, uploadpaths, deletepaths, and SearchPatterns properties in my code behind, then I have the following problems:

     

    1. upload is not enabled;
    2. delete button is not enabled; and
    3. SearchPatterns are not applied.

    I use version 2010.1.309.35.

    ASPX:

        <telerik:RadFileExplorer runat="server" ID="explorer" EnableViewState="true" Width="700px" Height="480px"  > 
        <Configuration ViewPaths="~/Content/1/" UploadPaths="~/Content/1/" DeletePaths="~/Content/1/" MaxUploadFileSize="8000000" SearchPatterns="*.png" /> 
        </telerik:RadFileExplorer> 
     

     

     


    C#:
    string[] paths = new string[] { "~/Content/2/""~/Content/1/"};  
     
    explorer.Configuration.MaxUploadFileSize = 1024 * 1024 * 8; // 8Mb  
    explorer.Configuration.SearchPatterns = new string[] { "*.png""*.jpg""*.gif" };  
    explorer.Configuration.ViewPaths = paths;  
    explorer.Configuration.UploadPaths = paths;  
    explorer.Configuration.DeletePaths = paths; 

  2. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 09 Apr 2010 Link to this post

    Hi Roland,

    We are not aware of such a problem. I tried to reproduce it on our side using the provided code snippets but to no avail. Could you please, open a support ticket and provide a sample runnable project that reproduces the problem so we can investigate it further?

    For your convenience I have attached my sample text project and a movie demonstrating my test. You can also modify the project to the point where the problem occurs and send it back.

    Regards,
    Dobromir
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Stephen Finchett
    Stephen Finchett avatar
    1 posts
    Member since:
    Feb 2004

    Posted 13 Apr 2010 Link to this post

    I have exactly the same problem.

    I have followed your example and that works fine.  So does setting the configuration items in the aspx page itself. 

    I have the control hidden to start with.  After clicking a button, I make it visible and set the config.  These changes do not update the files in the control.  I added another button to the page and when it is clicked after making the control visible and setting the config, the file explorer updates perfectly.

    After reading a few more posts it appears that the config MUST be set in the load event handler.  If not, the control is not updated properly.  I cannot do this; it must be done in an event handler that is called AFTER the load event.  Is there something I am missing or is this a fairly important limitation?


    Ste
  5. Roland Koops
    Roland Koops avatar
    3 posts
    Member since:
    Aug 2007

    Posted 14 Apr 2010 Link to this post

    Unfortunately I cannot attach zip files, but I have modified your default.apsx.cs. With some addition to the code the control does not work.

    public partial class Default : System.Web.UI.Page  
    {  
        protected void Page_Load(object sender, EventArgs e)  
        {  
            string[] paths = new string[] { "~/Content/1/""~/Content/2/" };  
     
            /* If this settings are set before the configuration settings the control does not work anymore */ 
            RadFileExplorer1.ExplorerMode = FileExplorerMode.FileTree;  
            RadFileExplorer1.VisibleControls = FileExplorerControls.ContextMenus | FileExplorerControls.Toolbar | FileExplorerControls.TreeView;  
            RadFileExplorer1.Language = Thread.CurrentThread.CurrentUICulture.Name;  
            RadFileExplorer1.EnableCreateNewFolder = true;  
            RadFileExplorer1.EnableOpenFile = true;  
     
            RadFileExplorer1.Configuration.MaxUploadFileSize = 1024 * 1024 * 8; // 8Mb    
            RadFileExplorer1.Configuration.SearchPatterns = new string[] { "*.png""*.jpg""*.gif" };  
            RadFileExplorer1.Configuration.ViewPaths = paths;  
            RadFileExplorer1.Configuration.UploadPaths = paths;  
            RadFileExplorer1.Configuration.DeletePaths = paths;  
        }  
    }  
     
     
  6. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 16 Apr 2010 Link to this post

    Hi Roland,

    Thank you for the clarification. I was able to reproduce the problem and can confirm that this is a bug. I logged it into our PITS system and we will do our best to fix it for one of our upcoming releases. You can follow the PITS Issue by its ID: 1815

    For the time being, as a workaround you can set UploadPaths and DeletePaths before setting EnableCreateNewFolder.

    As a small token of gratitude I have updated your Telerik points.

    Best wishes,
    Dobromir
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  7. Neil
    Neil avatar
    16 posts
    Member since:
    Mar 2007

    Posted 06 Jan 2011 Link to this post

    Was a solution ever created for this problem?  I'm trying to do the exact same thing within a dynamically loaded UserControl and getting the same results.

    Never Mind, the problem wasn't with the control.  It was path related.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017