This is a migrated thread and some comments may be shown as answers.
use radbutton in ConfirmTemplate
1 Answer 16 Views
This is a migrated thread and some comments may be shown as answers.
mirang
Top achievements
Rank 1
mirang asked on 27 Feb 2012, 11:56 AM
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>

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 28 Feb 2012, 10:57 AM
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.
Asked by
mirang
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or