Two useful features

10 posts, 0 answers
  1. Newton
    Newton avatar
    26 posts
    Member since:
    Sep 2005

    Posted 30 Mar 2009 Link to this post

    Hello,

    I would like to suggest two useful features for FileExplorer:

    1-) Integrate the Image Editor in context menu to resize image files.
    2-) Add paging support for folders with large number of files.


    Kind Regards,
    Newton
  2. Tervel
    Admin
    Tervel avatar
    1337 posts

    Posted 02 Apr 2009 Link to this post

    Hello Newton,

    Thank you for the suggestions.

    #2 is already on our TODO list with high prioprity.

    As for #1 - we plan to extend and further open the RadFileExplorer API to allow for "plugging-in" custom viewers, such as what we have done inside the RadEditor FileBrowser dialogs (e.g ImageManager dialog, for example).


    Sincerely yours,
    Tervel
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Shaun Peet
    Shaun Peet avatar
    571 posts
    Member since:
    Aug 2004

    Posted 03 Apr 2009 Link to this post

    Hi Tervel,

    Wouldn't it be easier on your end to make it easier on our end to use the ImageManager as a stand-alone control?  And, for that matter, the other FileBrowserDialogs of the RadEditor?

    Shaun.
  5. Tervel
    Admin
    Tervel avatar
    1337 posts

    Posted 06 Apr 2009 Link to this post

    Hi Shaun,

    This is indeed the direction we have taken. First of all, it has been possible for a long time to use the editor's ImageManager outside of RadEditor. The following KB demonstrates that:
    http://www.telerik.com/support/kb/aspnet-ajax/editor/using-the-image-and-document-managers-outside-radeditor.aspx

    We have also taken a number of steps that will allow for using the DialogOpener control as a separate, independent control which can be configured in a declarative manner. In addition to this, the "communication" between the editor dialogs and the invoking control has been streamlined and unified to use the same API, the same conventions and the same objects. You can expect this functionality to be finalized and documented at some point - which will make it possible to call any RadEditor dialog independent of the editor itself in an easy, straightforward manner.

    One last thing - if you wish to have fine-grained control over the server-side events raised by the RadFileExplorer in the ImageManager dialog, I suggest you examine the sample project attached here - standalonedialogserverevents.zip


    The code will allow you to attach and execute code when the Upload, Rename, Delete, etc commands of the standalone File Browser dialogs are fired:
    1. Register the external dialog files:
      1. Copy the EditorDialogs folder to the root of the web project
      2. Set imageManager.Parameters["ExternalDialogsPath"] = "~/EditorDialogs/";  in the codebehind
    2. Create a UserControl in the root of your web application for example named customControl.ascx and put the following code in it:

      <%@ Control Language="C#" AutoEventWireup="true" %> 
       
      <script runat="server" type="text/C#"
       
          protected void Page_Load(object sender, System.EventArgs args) 
          { 
              Telerik.Web.UI.RadFileExplorer rfe = (Telerik.Web.UI.RadFileExplorer)this.FindRadControl(this.Page); 
              if (rfe != null
              { 
                  rfe.ItemCommand += new Telerik.Web.UI.RadFileExplorerEventHandler(rfe_ItemCommand); 
              } 
          } 
       
          void rfe_ItemCommand(object sender, Telerik.Web.UI.RadFileExplorerEventArgs e) 
          { 
              string command = e.Command; 
              //throw new Exception(e.Command); 
          } 
       
          private Control FindRadControl(Control parent) 
          { 
              foreach (Control c in parent.Controls) 
              { 
                  if (c is Telerik.Web.UI.RadFileExplorer) return c; 
                  if (c.Controls.Count > 0) 
                  { 
                      Control sub = FindRadControl(c); 
                      if (sub != nullreturn sub; 
                  } 
              } 
              return null
          } 
       
      </script> 

      Here the string command = e.Command; will return the executed command name when the command is executed. You can implement and execute your code inside the  rfe_ItemCommand() function.
    3. Register the custom control in the \EditorDialogs\FileBrowser.ascx external dialog control:
      <%@ Register TagPrefix="custom" TagName="customControl" Src="~/customControl.ascx"  %> 
      <custom:customControl ID="customControl1" runat="server" />  


    Best wishes,
    Tervel
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  6. Shaun Peet
    Shaun Peet avatar
    571 posts
    Member since:
    Aug 2004

    Posted 06 Apr 2009 Link to this post

    Hi Tervel,

    I appreciate the provided sample.  I've been using the FileBrowserDialogs outside of the RadEditor for years, but the Q1 2009 release broke a lot of my old code; particularly when it came to the Document Manager; therefore I quickly had to come up with my own file selector dialog using a FileExplorer - to which I've had varying degrees of success (posted here).  I had a look at the new KB article and there's alot of new js involved when opening the Document Manager - most of which I think is *not* necessary when opening an Image Manager (seems to work without it, anyway):

    Document Manager:
        var args = new Telerik.Web.UI.EditorCommandEventArgs("DocumentManager"nulldocument.createElement("a"));  
        args.CssClasses = [];  
          
        $find('<%= DialogOpener1.ClientID %>').open('DocumentManager', args);  

    Image Manager:
        $find('<%= DialogOpener1.ClientID %>').open('ImageManager);

    In any case, I think you guys may be underestimating just how many people are using the Dialogs outside of the RadEditor (since they're so extremely useful) and need to call more attention to breaking changes.

    I am available to help out whenever possible.  Thanks,

    Shaun.
  7. Shaun Peet
    Shaun Peet avatar
    571 posts
    Member since:
    Aug 2004

    Posted 06 Apr 2009 Link to this post

    Also, the KB article has, in the aspx, a <telerik:DialogOpener... />.  Visual Studio tells me that I should be using a <telerik:RadDialogOpener... /> instead.  Is there anything different between the two, other than the name?
  8. Tervel
    Admin
    Tervel avatar
    1337 posts

    Posted 09 Apr 2009 Link to this post

    Hello Shaun,

    There is no difference - the RadDialogOpener cotnrol simply inherits from the DialogOpener control without adding additional features. The reason for this is that the two controls reside in different namespaces - as mentioned earlier, we plan to add more features and expose the RadFileOpener as a full-blown member of the RadControls suite. This is why it has  to be in the Telerik.Web.UI namespace - but for backwards compatibility the original control was also kept.


    All the best,
    Tervel
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  9. Michael
    Michael avatar
    3 posts
    Member since:
    May 2009

    Posted 24 Jun 2009 Link to this post

    Hi Tervel,

    When using code similar to your rfe_ItemCommand example, I only receive "Update" commands, all other actions, which you mention, do not seem to be wired in to the server-side ItemCommand event. Are there in fact more events related to the event or am I missing a setting or specific configuration to handle the other events you mention?

    Best,
    Michael
  10. Lini
    Admin
    Lini avatar
    2144 posts

    Posted 25 Jun 2009 Link to this post

    Hi Michael,

    The possible command names for the File Explorer's ItemCommand server event are: UploadFile, MoveFile, MoveDirectory, CreateDirectory, DeleteDirectory, DeleteFile. Other file explorer actions will not raise the ItemCommand event. I am not sure what you mean by "Update" commands, since there is no "Update" command name. If you want to say that there are no commands for navigating to a folder or opening a file - then you are correct.

    Best wishes,
    Lini
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  11. Michael
    Michael avatar
    3 posts
    Member since:
    May 2009

    Posted 25 Jun 2009 Link to this post

    Lini,

    Sorry for the typo, I was referring to the "Upload" command...
    Thanks for the info.

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017