Changing dialog button text in code behind

2 posts, 0 answers
  1. AR
    AR avatar
    5 posts
    Member since:
    Jun 2006

    Posted 12 Aug 2013 Link to this post


    I'm having problems changing the dialog button text (for link manager and image manager ) in code behind. 

    I was able to change the text for the spellchecker by doing the following:
    oRadEd.Localization.Main.SpellCheckEnd = "MyText";

    If I try to do something similar for the Dialog windows It is not possible since oRadEd.Localization only offers to change Main, Modules and Tools text. I don't have access to the dialog text. 

    The reason why we must do this that way is because we store the translation in database. 
  2. Ianko
    Ianko avatar
    1956 posts

    Posted 13 Aug 2013 Link to this post

    Hi Auðunn,

    The dialogs are designed to use the built-in localization of RadEditor control. Nevertheless, further customization of the built-in dialogs could be a possible approach to achieve getting the translated text from database. 

    For this approach first you need to get the original dialogs from [installation_folder]/EditorDialogs.
    After that copy them in a desired folder in your project and point the path to them as value in the ExternalDialogsPath property. 

    In the dialog files you could see that the text values are set with JavaScript code like this:
    You could modify the wrapper elements with setting the runat property and an unique ID. With these modifications you should be able to set the values from the code-behind and use a database.

    Please note that such customizations are out of the scope of our support service and you should use them at your own risk.
    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 the blog feed now.
Back to Top