Radconfirm buttons

6 posts, 1 answers
  1. Herseng Yang
    Herseng Yang avatar
    4 posts
    Member since:
    Jan 2010

    Posted 04 Jan 2010 Link to this post

    Here's the scenario I'm having issues with. In the grid, when clients clicks on whatever rows, a modal window will pop open with more details of the row selected. Whenever the "X" on the top right corner of the modal window is clicked, this will show a popup box (default) with two buttons "ok/cancel". I just wanted to know, is there a way to set the buttons from "ok/cancel" to "yes/no" within the current version? I've looked at and searched and tried most of the suggestions but wasnt able to resolve the issue I'm having. Please give me your input or any suggestions as to how I can resolve this issue.  
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 05 Jan 2010 Link to this post

    Hi Herseng,

    You can change the localization strings of the control by using the following Javascript code that should be placed after the RadWindow / RadWindowManager declaration.

    JavaScript:
     
    <script type="text/javascript"
    Telerik.Web.UI.RadWindowUtils.Localization =   
    {  
        "Close" : "Close",  
        "Minimize" : "Minimize",  
        "Maximize" : "Maximize",  
        "Reload" : "Reload",  
        "PinOn" : "Pin on",  
        "PinOff" : "Pin off",  
        "Restore" : "Restore",  
        "OK" : "Yes",  
        "Cancel" : "No" 
    };  
    </script> 
    Checkout the following KB article which describes the same: Changing the localization of RadWindow

    -Shinu.
  3. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 05 Jan 2010 Link to this post

    Hello Herseng,

    I believe that the following KB article will be of help - it shows how to change the localization of the RadWindow control:
    http://www.telerik.com/support/kb/aspnet-ajax/window/radwindow-for-asp-net-ajax-localization.aspx


    Kind regards,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  4. Herseng Yang
    Herseng Yang avatar
    4 posts
    Member since:
    Jan 2010

    Posted 05 Jan 2010 Link to this post

    Hi Shinu and Georgi,

    Unfortunately the javascript code suggest didnt work for me. I'm still getting the default buttons ("ok/cancel"). I added the code after the RadWindowManger declaration and afterwards added the code before the </form> tag. Both tries gave me the same result. I ran the parent page (search.aspx), click on a row, it brings up the modal window of the child page(searchresultdetails.aspx) with additional information regarding the row I selected. When I click on the "X" to close, I still get the default buttons ("ok/cancel"). I tried it with just the childpage(searchresultdetails.aspx) as well, adding the javascript before the </form> tag. This time when I ran it and select a row, while the modal window is loading, it brings me to the javascript suggested with this error: --> Microsoft JScript runtime error: 'Telerik' is undefined <-- Any other suggestions?
  5. Answer
    Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 06 Jan 2010 Link to this post

    Hello Herseng,

    In general, "Telerik is undefined" indicates that the JavaScript for the control has not been loaded when you tried to call something from it - this could happen for example if you try to execute such code in Page_Load (e.g. after a postback), because all ASP.NET AJAX controls, including ours, are loaded after that - in Sys.Application.Init.

    As for the localization problem, I am not quite sure what the problem might be. For convenience I attached a small sample page to this thread where I have changed the localization strings for the radconfirm dialog, along with a picture of the result in the browser. I hope it will be of help.
    Note that you could also create your own template for the confirm dialog and hardcode the strings there - more information on the subject is available in this help article.




    Kind regards,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  6. Herseng Yang
    Herseng Yang avatar
    4 posts
    Member since:
    Jan 2010

    Posted 06 Jan 2010 Link to this post

    Hi Georgi,

    Thank you so much for the attached files. This helped me greatly! I appreciate your kind help in helping me resolve my issue.
Back to Top