Skip to content

Commit da95205

Browse files
committed
kb(button): update confirm dialog buttons text
1 parent a1702d6 commit da95205

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
title: Localize the OK and Cancel buttons text of the RadButton Confirm dialog
3+
description: Learn how to update the text of the Ok and Cancel buttons of the RadButton Confirm dialog - Telerik UI for ASP.NET AJAX
4+
type: how-to
5+
page_title: Change the default text of the OK and Cancel buttons of RadButton Confirm dialog
6+
slug: button-change-confirm-dialog-buttons-text
7+
position:
8+
tags:
9+
ticketid: 1577895
10+
res_type: kb
11+
---
12+
13+
## Environment
14+
<table>
15+
<tbody>
16+
<tr>
17+
<td>Product</td>
18+
<td>Progress® Telerik® UI for ASP.NET AJAX</td>
19+
</tr>
20+
</tbody>
21+
</table>
22+
23+
24+
## Description
25+
The article shows how to change the text of the Ok and Cancel buttons of the RadButton Confirm dialog to Yes and No.
26+
27+
## Solution
28+
The localization (OK and Cancel text change) can be achieved, by using [RadConfirm dialog]({%slug button/functionality/button-confirm-dialog#using-radconfirm%}) instead of the browser confirm one, since the browser's one cannot be modified (customized).
29+
30+
You need to register RadWindowManager and override [its ConfirmTemplate]({%slug window/alert,-confirm,-prompt-dialogs/how-to-change-the-dialog-templates%}) as shown below:
31+
32+
````ASPX
33+
<telerik:RadButton ID="cmdCreateBatch" runat="server" Text="Create Batch" Width="160" >
34+
<ConfirmSettings ConfirmText="Are you sure want to Create the Batch?" />
35+
</telerik:RadButton>
36+
37+
<telerik:RadWindowManager ID="RadWindowManager1" runat="server">
38+
<ConfirmTemplate>
39+
<div class="rwDialog rwConfirmDialog">
40+
<div class="rwDialogContent">
41+
<div class="rwDialogMessage">{1}</div>
42+
</div>
43+
<div class="rwDialogButtons">
44+
<button type="button" class="rwOkBtn" onclick="$find('{0}').close(true); return false;">##LOC[Yes]##</button>
45+
<button type="button" class="rwCancelBtn" onclick="$find('{0}').close(false); return false;">##LOC[No]##</button>
46+
</div>
47+
</div>
48+
</ConfirmTemplate>
49+
</telerik:RadWindowManager>
50+
````
51+
52+

0 commit comments

Comments
 (0)