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

Custom dialog with file explorer insert and cancel buttons

1 Answer 76 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Phil
Top achievements
Rank 1
Phil asked on 23 Dec 2010, 05:29 PM
Hi

I have successfully created a custom dialog for my radEditor which uses a radFileExplorer to display a list of assets which a user can add to their page.  At the moment the user needs to double click on one of the items in the radFileExplorer in order to select and insert it into the underlying radEditor. 

I wish to make my dialog work like the out of the box dialogs (e.g. Image Manager) and implement  "Insert" and "Cancel" buttons.   "Insert" will insert the selected asset (mimicing what happens already on a double click it) and "Cancel" will close my custom dialog.  I cannot figure out the code which I should be using on my custom buttons implement this.

Can you help ?

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 28 Dec 2010, 10:36 AM
Hello Stephen,

The insert button should call the oFileExplorer.get_selectedItem() method, which returns a RadFileExplorerItem object or oFileExplorer.get_selectedItem().get_url() which will return the URL value of the selected image (item).

The close button should execute getRadWindow().close(); which will close the custom dialog.

You can find more information about the custom dialogs in the following article: Add Custom Dialogs.

Best regards,
Rumen
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Editor
Asked by
Phil
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or