How to change RadConfirm button text

2 posts, 0 answers
  1. Kavita
    Kavita avatar
    39 posts
    Member since:
    Feb 2013

    Posted 27 May 2013 Link to this post

    hi,
    I want to change the text of ok and cancel button in radconfirm dialogue.
    Telerik.Web.UI.RadWindowUtils.Localization =  
    {   
        "OK" : "OK"
        "Cancel" : "Cancel"
    };


    but it changes button text of all radconfirm, radalerts and radwinodws.
    I want to change the button text of radconfirm only.
    Please suggest some solution.
    it is urgent for me.
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 27 May 2013 Link to this post

    Hi,

    You can use the ConfirmTemplate of the RadWindowManager to change the dialog templates. Please have a look into the following code i tried which works fine at my end.

    ASPX:
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
        <ConfirmTemplate>
            <div class="rwDialogPopup radconfirm">
                <div class="rwDialogText">
                    {1}
                </div>
                <div>
                    <a onclick="$find('{0}').close(true);" class="rwPopupButton" href="javascript:void(0);">
                        <span class="rwOuterSpan"><span class="rwInnerSpan">SSS</span></span></a> <a onclick="$find('{0}').close(false);"
                            class="rwPopupButton" href="javascript:void(0);"><span class="rwOuterSpan"><span
                                class="rwInnerSpan">Nooo</span></span></a>
                </div>
            </div>
        </ConfirmTemplate>
    </telerik:RadWindowManager>
    <button onclick="radconfirm('Are you sure?', confirmCallBackFn); return false;">
        show radconfirm</button>

    JavaScript:
    <script type="text/javascript">
        function confirmCallBackFn(arg) {
            radalert("Confirm returned the following result: " + arg);
        }
    </script>

    Thanks,
    Shinu.
Back to Top