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

RadDialogOpener control issue

5 Answers 58 Views
Editor
This is a migrated thread and some comments may be shown as answers.
lan luo
Top achievements
Rank 1
lan luo asked on 20 Nov 2015, 06:46 PM

Hi Telerik Team,

We are trying to create stand-along document, image, flash and media managers without Editor. We use RadDialogOpener to open different dialogs. It works great except we try to get select item value. We using "ClientCallbackFunction", in that function, the "args.get_value()" return an object. Can we have a method to return a html string so we can easily to display?

 script below:

function CallbackFunction( sender, args )

{

    

}

 Thanks,

Lan

5 Answers, 1 is accepted

Sort by
0
lan luo
Top achievements
Rank 1
answered on 20 Nov 2015, 06:48 PM

 function CallbackFunction( sender, args )
{
       var selectElement = args.get_value();     // it's an object, can we make it as html string ?
}

0
Ianko
Telerik team
answered on 23 Nov 2015, 11:00 AM
Hi,

This can be done only by customizing the logic implemented in the dialogs. I.e., Customizing the Built-in Dialogs—http://demos.telerik.com/aspnet-ajax/editor/examples/externaldialogspath/defaultcs.aspx.

In this case, you should configure the DialogDefinition instance with an ExternalDialogsPath parameter. Here you are an example:
DialogDefinition imageManager = new DialogDefinition(typeof(ImageManagerDialog), imageManagerParameters);
imageManager.ClientCallbackFunction = "ImageManagerFunction";
imageManager.Width = Unit.Pixel(694);
imageManager.Height = Unit.Pixel(440);
//If you need to customize the dialog then register the external dialogs path
imageManager.Parameters["ExternalDialogsPath"] = "~/EditorDialogs/"
 
DialogOpener1.DialogDefinitions.Add("ImageManager", imageManager);


Regards,
Ianko
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
lan luo
Top achievements
Rank 1
answered on 23 Nov 2015, 02:33 PM

Hi Lanko,

 Thanks for replying. The code below is the javascript function. We want to get the selected item html string. For example, when when open ImageManager dialog, args.get_value() will an image object, we try to find a way to return a string like "<img src = '...'  style='...' title='...' />". Is there any method or function we can use ?

 

function CallbackFunction( sender, args )
{
       var selectElement = args.get_value();     // it's an object, can we make it as html string ?
}

Regards,

 

Lan

0
Accepted
Ianko
Telerik team
answered on 24 Nov 2015, 07:11 AM
Hi lan,

If the object returned from the dialog has no property that returns the string representation of the img tag, then I am afraid there is no method for that either.

This is why I suggested you to examine the code of the dialogs and examine it. And if needed, to eventually customize it as per to your needs.

Regards,
Ianko
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
lan luo
Top achievements
Rank 1
answered on 24 Nov 2015, 02:22 PM
Thank you lanko.
Tags
Editor
Asked by
lan luo
Top achievements
Rank 1
Answers by
lan luo
Top achievements
Rank 1
Ianko
Telerik team
Share this question
or