use radbutton in ConfirmTemplate

2 posts, 0 answers
  1. mirang
    mirang avatar
    115 posts
    Member since:
    Aug 2010

    Posted 27 Feb 2012 Link to this post

    Is it possible to replace the <a> elements inside the ConfirmTemplate (below) for Ok and Cancel with RadButtons ? : 

    <a tabindex="0" id="confirmOk" name="confirmOk" onclick="$find('{0}').close(true);" class="rwPopupButton" href="javascript:void(0);">
                        <%= WebResources.SearchInOk %></a>
                        <telerik:RadButton ID="btn1" runat="server" Text="Test" />
                    <a tabindex="1" id="confirmCancel" name="confirmCancel" onclick="$find('{0}').close(false);" class="rwPopupButton" href="javascript:void(0);">
                        <%= WebResources.SearchInCancel %></a>
  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    4529 posts

    Posted 28 Feb 2012 Link to this post

    Hi Mirang,

    The predefined dialogs can only take HTML elements and not complex server controls, because their rendering is different and they have more complex requirements regarding the page lifecycle. The built-in buttons are designed to provide a consistent look with the rest of the controls and offer localization as explained in this help article and shown in this online demo, so I believe you needn't use RadButtons for the predefined dialogs. Nevertheless, if you need to use them you can create a RadWIndow configured look like an alert (size, modality, behaviors, etc.) and in its content template you can place the controls you need. You would only need to attach custom event handlerse for the buttons that get a proper reference to the control in order to close it with the respective argument.


    Regards,
    Marin
    the Telerik team
    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 their blog feed now.
Back to Top