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

Confirmation dialog box with RadWindow

1 Answer 13 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Pravallika
Top achievements
Rank 1
Pravallika asked on 09 Jun 2014, 09:45 AM
Hai All I am new to telerik i have a Radbutton when i click on button it will do some operation and at the same time it will show radwindow with yes and no buttons if you 
click on yes it will show alert message saved sucessfully when i click on ok it will go to another page 

Exmple:

<asp:Button ID="Button1" runat="server" Text="Save" CssClass="btnSaveForm" OnClick="btnTotalaSave_Click" />
        

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 10 Jun 2014, 03:20 AM
Hi Pravallika,

In your scenario you can use the RadConfirm instead of RadWindow. Please have a look into the sample code snippet to achieve your scenario.

ASPX:
<telerik:RadButton ID="radbtnOpenWindow" runat="server" Text="Confirmation" OnClick="radbtnOpenWindow_Click">
</telerik:RadButton>
<telerik:RadWindowManager ID="radwindowmngrConfirm" runat="server" Localization-OK="Yes"
    Localization-Cancel="No">
</telerik:RadWindowManager>

C#:
protected void radbtnOpenWindow_Click(object sender, EventArgs e)
{
    radwindowmngrConfirm.RadConfirm("Are you sure you want to save the file?", "CallBack", 500, 200, null, "Confirm");
}

JavaScript:
function CallBack(args) {
    if (args) {
        alert("Saved Successfully");
    }
    else {
        //here give the url of the page
        window.open("GetRadEditor.aspx", "_blank");
 
    }
}

Thanks,
Shinu.
Tags
Editor
Asked by
Pravallika
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Share this question
or