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

Deleting document and clearing manager preview

3 Answers 33 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Dave
Top achievements
Rank 1
Dave asked on 12 Apr 2013, 10:02 PM
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

3 Answers, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 17 Apr 2013, 02:56 PM
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.
0
Dave
Top achievements
Rank 1
answered on 17 Apr 2013, 07:03 PM
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
0
Vessy
Telerik team
answered on 22 Apr 2013, 02:31 PM
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.
Tags
Editor
Asked by
Dave
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Dave
Top achievements
Rank 1
Share this question
or