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

Radwindowmanager confirmation server side

2 Answers 63 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Shakti SIngh Dulawat
Top achievements
Rank 1
Shakti SIngh Dulawat asked on 05 Sep 2012, 05:32 PM
Dear friends,
I am using radwindowmanager in asp.net
can some one please give me a good idea how to using radwindowmanager confirmations message at server side!
Some thing like 

Have two buttons on the dialog which are “Scan Another” and “Translate”. Scan Another will

clear the scanned bet image and reset the stake to £0.00. Translate will go immediate to the

translate tab with that bet selected. 

This is what right now I am using!

<telerik:radwindowmanager id="RadWindowManagerTakeBet" runat="server" skin="Metro">
</telerik:radwindowmanager>

RadWindowManagerTakeBet.RadAlert("Stake Saved!", 330, 100, "No Bet Stake", null, null);





Thanks,
Shakti

2 Answers, 1 is accepted

Sort by
0
Accepted
Eyup
Telerik team
answered on 10 Sep 2012, 01:21 PM
Hello Shakti,

You can get the result from the RadConfirm or RadAlert only on client-side. And according to the user's selection you could fire a command with the corresponding outcome. For example:
  mark-up:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
</telerik:RadAjaxManager>
<telerik:RadWindowManager ID="RadWindowManagerTakeBet" runat="server" Skin="Metro">
</telerik:RadWindowManager>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />
  JavaScript:
function confirmCallBackFn(arg) {
    var ajaxManager = $find("<%=RadAjaxManager1.ClientID%>");
    if (arg) {
        ajaxManager.ajaxRequest('TranslateConfirmed');
    }
    else {
        ajaxManager.ajaxRequest('TranslateRejected');
    }
}
  C#:
protected void Button1_Click(object sender, EventArgs e)
{
    RadWindowManagerTakeBet.RadConfirm("Are you sure to translate?", "confirmCallBackFn", 300, 100, null, "My Confirm");
}
protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
{
    if (e.Argument == "TranslateConfirmed")
    {
       // execute custom logic
    }
}

I hope this will prove helpful.

Kind regards,
Eyup
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.
0
Shakti SIngh Dulawat
Top achievements
Rank 1
answered on 13 Sep 2012, 01:50 PM
Wonderful Solutions work Perfect!

Thanks,
Shakti
Tags
Ajax
Asked by
Shakti SIngh Dulawat
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Shakti SIngh Dulawat
Top achievements
Rank 1
Share this question
or