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

RadAlert, RadConfirm using RadWindowManager not working

4 Answers 681 Views
Window
This is a migrated thread and some comments may be shown as answers.
Subhash
Top achievements
Rank 1
Subhash asked on 02 Dec 2011, 04:35 PM
Hi
I am using the RadWindowManager in a ASP.NET 4.0 and VS 2010. I placed a RadWindowMangaer on a content page. In the code behind of the button click I want to call this.radWindowManager1.RadAlert(...); For some reason after hitting the period after radWindowManger1 I do not see any of the pre build rad windows (radAlert, radconfirm etc). Maybe it is a version issue. I am using 2010.3.1215.40. Please help. All other controls in the suite work just fine.

<%

 

@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"

 

 

 

CodeBehind="Default.aspx.cs" Inherits="TelerikRadWindowSample._Default" %>

 

<%

 

@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

 

<

 

 

asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">

 

</

 

 

asp:Content>

 

<

 

 

asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">

 

 

 

<telerik:RadWindowManager ID="radWindowManager1" runat="server"></telerik:RadWindowManager>

 

 

 

<h2>

 

Welcome to ASP.NET!

 

 

</h2>

 

 

 

<asp:Button ID="Button1" runat="server" Text="Open Rad Window"

 

 

 

onclick="Button1_Click" />

 

 

 

</p>

 

</

 

 

asp:Content>

here is my code behind

 

protected

 

 

void Button1_Click(object sender, EventArgs e)

 

{

 

 

// I dont see RadAlert
this
.radWindowManager1.

 

}

 

 

4 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 05 Dec 2011, 05:06 AM
Hello Subhash,

Try the following code.
C#:
protected void Button1_Click1(object sender, EventArgs e)
{
  RadWindowManager1.RadAlert("RadAlert is called from the server", 330, 100, "Server RadAlert", "alertCallBackFn");
}
JS:
function alertCallBackFn(arg)
 {
    radalert("<strong>radalert</strong> returned the following result: <h3 style='color: #ff0000;'>" + arg + "</h3>", null, null, "Result");
}
Also check the following demo.
Window / Alert, Prompt, Confirm

-Shinu.
0
Accepted
Marin Bratanov
Telerik team
answered on 06 Dec 2011, 05:03 PM
Hello guys,

The server-side methods that call the predefined dialogs were added in Q1 2011 and are, therefore, not available in the previous versions (including the one in question - Q3 2010 SP1). This is also noted in the documentation, for example here.


Kind 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
0
Prashant
Top achievements
Rank 1
answered on 20 Jul 2015, 10:30 AM

this is a Javascript function:
<script type="text/javascript">
        function callBackFn(arg) {

            return false;
        }
            </script>


This is Code Behind Code:
RadWindowManager1.RadAlert("Password Change Successfully", 300, 150, "TestQueue", "callBackFn","success.png");

and i hav also used RadWindiwManager on aspx page still it is not showing RadAlert....

Pleasae give me some solution asap....thnx in advance

so it is not calling that javascript(callBackFn) from codebehind 

0
Danail Vasilev
Telerik team
answered on 23 Jul 2015, 06:17 AM
Hello Prashant,

The code below works properly on my side when the button is clicked:

ASPX:
<form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
    <script type="text/javascript">
        function callBackFn(arg) {
            alert('alert from callback');
            return false;
        }
    </script>
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server"></telerik:RadWindowManager>
    <telerik:RadButton ID="RadButton1" runat="server" Text="Show RadAlert" OnClick="RadButton1_Click" />
</form>
C#:
protected void RadButton1_Click(object sender, EventArgs e)
{
    RadWindowManager1.RadAlert("Password Change Successfully", 300, 150, "TestQueue", "callBackFn", "success.png");
}

Are there any JavaScript errors on your page? If so they should be found and fixed.

Regards,
Danail Vasilev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Window
Asked by
Subhash
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Marin Bratanov
Telerik team
Prashant
Top achievements
Rank 1
Danail Vasilev
Telerik team
Share this question
or