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

Alert Message doesn't work inside RadUpdatePanel

7 Answers 99 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ronnie
Top achievements
Rank 1
Ronnie asked on 15 Dec 2008, 04:39 PM
I have a RadWindowManager and a RadGrid inside a RadUpdatePanel and for some reason my RadAlertMessage won't show.  It works great when I remove the panel.

Here is my Alert function:
Public Sub ShowRadAlertMessage(ByVal message As String)
    
Dim radalertscript As String = "<script language='javascript'> Sys.Application.add_load(function(){radalert('" & message & "', 330, 210);})</script>"
    Page.ClientScript.RegisterStartupScript(Me.[GetType](), "radalert", radalertscript)
End Sub

All I do is call it and pass it the message that I want displayed.  What can I do to get this to work inside the update panel?

7 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 16 Dec 2008, 07:18 AM
Hello Ronnie,

You do not need Sys.Application.add_load. Here is an example how to achieve your goal:

ScriptManager.RegisterStartupScript(Page, GetType(Page), "radalert", "radalert('Hi!');", True)

All the best,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Ronnie
Top achievements
Rank 1
answered on 16 Dec 2008, 07:01 PM
Thanks Vlad for the response.  I changed my alert function to this and it still isn't working correctly.  Am I missing something else?

Public Sub ShowRadAlertMessage(ByVal message As String)
    Dim radalertscript As String = "radalert('" & message & "')"
    Page.ClientScript.RegisterStartupScript(Page.GetType(), "MyAlert", radalertscript, True)
End Sub
0
Daniel
Telerik team
answered on 16 Dec 2008, 07:34 PM
Hello Ronnie,

Would you please try the approach suggested by Vlad?
Public Sub ShowRadAlertMessage(ByVal message As String
    Dim radalertscript As String = "radalert('" & message & "')" 
    ScriptManager.RegisterStartupScript(Page, Page.GetType(), "MyAlert", radalertscript, True
End Sub  

Let us know whether this helps.

Best regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Ronnie
Top achievements
Rank 1
answered on 16 Dec 2008, 08:06 PM
I am getting javascript error when I use that function.  It says,

'this._windwos.length' is null or not an object

and

Object doesn't support this property or method.
0
Vlad
Telerik team
answered on 17 Dec 2008, 06:54 AM
Hello Ronnie,

Do you have RadWindowManager on this page?

Greetings,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Accepted
Daniel
Telerik team
answered on 17 Dec 2008, 11:26 AM
Hello Ronnie,

I have yet another suggestion.

Please take the RadWindowManager out of the RadAjaxPanel control and try again.

Let us know if you need more information.

Best regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Ronnie
Top achievements
Rank 1
answered on 17 Dec 2008, 03:12 PM
Thanks Both of you, that was exactly the issue.  I had the Rad window inside the update panel along with my grid.  I appreciate all the help.
Tags
Grid
Asked by
Ronnie
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Ronnie
Top achievements
Rank 1
Daniel
Telerik team
Share this question
or