Deleting document and clearing manager preview

4 posts, 0 answers
  1. Dave
    Dave avatar
    24 posts
    Member since:
    Jul 2012

    Posted 12 Apr 2013 Link to this post

    When you select a document in the document manager, the preview panel populates and the Insert button enables.  If you then delete the selected document, the data in the preview panel remains, and the Insert button is still enabled.  If the user clicks Insert, then a link is created to the document that was just deleted.

    Is there a way to reset the preview panel, after the document is deleted?

    Thanks!
    Dave
  2. Vessy
    Admin
    Vessy avatar
    1976 posts

    Posted 17 Apr 2013 Link to this post

    Hi Dave,

    Thank you for reporting this issue - I managed to reproduce it and I have logged it into our bug-tracking system. You could track its progress here: FeedBack Portal.

    For the time being you can workaround it in the following way:
    • Copy the Editor's dialogs from the RadControls installation folder to a folder into you application root, and set the path to them as a value to the Editor's ExternalDialogsPath property. 
    • In the FileBrowser.ascx dialog attach a handler to the FileExplorer's OnClientDelete event in order to select another item after a file is deleted:
      <telerik:RadFileExplorer ID="RadFileExplorer1" Height="450px" Width="400px" TreePaneWidth="150px" OnClientDelete="OnClientDelete" runat="Server" EnableOpenFile="false" AllowPaging="true" PageSize="100" />
      JavaScript:
      function OnClientDelete(fileExplorer, args) {
          if (!args.get_item().isDirectory()) {
              fileExplorer.get_grid().get_masterTableView().selectItem(0);
          }
      }

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

    Kind regards,
    Veselina Raykova
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. Dave
    Dave avatar
    24 posts
    Member since:
    Jul 2012

    Posted 17 Apr 2013 Link to this post

    Hi Veselina,

    Thank you for your response and the points.  I believe your workaround will work providing there is at least one item remaining in the FileExplorer.  However, if the user deletes the last item, then this line will not work:  fileExplorer.get_grid().get_masterTableView().selectItem(0);   because row 0 will be gone.    Any ideas on how to handle this one case?

    Thanks so much!
    Dave
  4. Vessy
    Admin
    Vessy avatar
    1976 posts

    Posted 22 Apr 2013 Link to this post

    Hi Dave,

    I understand that there might be cases like the above described one, which are not handled by this solution but I am afraid that this is the optimal workaround that I am able to provide you for the moment. This is also the reason why it is not used for a permanent fix of the issue and it is logged for further investigation from our developers.

    Please, excuse us for the temporary inconvenineces.

    Regards,
    Veselina Raykova
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top