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

Unable to Launch RadAlert From Code Behind

1 Answer 56 Views
Window
This is a migrated thread and some comments may be shown as answers.
Shawn
Top achievements
Rank 1
Shawn asked on 06 Mar 2009, 05:21 PM
I am attempting to display a radAlert once a record has been updated - very straight forward.  I have stepped through the code and know it is getting there, for some reason the window simply does not show up.  I have the window manager and AjaxScriptManager on the page:
<asp:ScriptManager ID="ScriptManager1" runat="server"
        </asp:ScriptManager>  
        <telerik:RadAjaxManager ID="AppRadAjaxManager" runat="server"
        </telerik:RadAjaxManager> 
        <telerik:RadWindowManager ID="AppRadWindowManager" runat="server" Width="400px"
        </telerik:RadWindowManager> 
I am trying to call the alert simply by doing this:
Dim Updated As Integer = Applications_DataAccess.UpdateApplicantInfo(record, first_name, last_name) 
 
                If Updated > 0 Then 
                    'does absolutely nothing 
                    DisplayMessage("Application Record Has Been Updated Successfully.""Update SUCCESS"
 
                    'works fine 
                    'MsgBox("Application Record Has Been Updated Successfully.", MsgBoxStyle.Exclamation, "Update SUCCESS") 
                End If 
Private Sub DisplayMessage(ByVal text As StringByVal title As String
        AppRadAjaxManager.ResponseScripts.Add("Sys.Application.add_load(function(){radalert('" & text & "', 330, 210, '" & title & "');})"
    End Sub 

So.... What am I doing wrong here?

(the page I am calling this from is a RadWindow in itself, called from a Grid Edit - could that be the reason?  I don't see why but who knows...


1 Answer, 1 is accepted

Sort by
0
Accepted
Georgi Tunev
Telerik team
answered on 07 Mar 2009, 08:54 AM
Hi Shawn,

If you are using the ResponseScripts collection of RadAjaxManager, please make sure that the caller (the grid in your case) is set to ajaxify the RadWindowManager - you can see how it is done here (p.3).

If you still experience problems, please open a support ticket and send us a small sample project where the problem could be reproduced. We will check it and get back to you with solution.


Regards,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Window
Asked by
Shawn
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or