RadDialogOpener control issue

6 posts, 1 answers
  1. lan luo
    lan luo avatar
    36 posts
    Member since:
    May 2010

    Posted 20 Nov 2015 Link to this post

    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

  2. lan luo
    lan luo avatar
    36 posts
    Member since:
    May 2010

    Posted 20 Nov 2015 in reply to lan luo Link to this post

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

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 23 Nov 2015 Link to this post

    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
  5. lan luo
    lan luo avatar
    36 posts
    Member since:
    May 2010

    Posted 23 Nov 2015 in reply to Ianko Link to this post

    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

  6. Answer
    Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 24 Nov 2015 Link to this post

    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
  7. lan luo
    lan luo avatar
    36 posts
    Member since:
    May 2010

    Posted 24 Nov 2015 Link to this post

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