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

[Solved] Radconfirm buttons

5 Answers 239 Views
Window
This is a migrated thread and some comments may be shown as answers.
Herseng Yang
Top achievements
Rank 1
Herseng Yang asked on 04 Jan 2010, 04:15 PM
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.  

5 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 05 Jan 2010, 06:29 AM
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.
0
Georgi Tunev
Telerik team
answered on 05 Jan 2010, 07:09 AM
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.
0
Herseng Yang
Top achievements
Rank 1
answered on 05 Jan 2010, 02:52 PM
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?
0
Accepted
Georgi Tunev
Telerik team
answered on 06 Jan 2010, 11:25 AM
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.
0
Herseng Yang
Top achievements
Rank 1
answered on 06 Jan 2010, 01:42 PM
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.
Tags
Window
Asked by
Herseng Yang
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Georgi Tunev
Telerik team
Herseng Yang
Top achievements
Rank 1
Share this question
or