Hi Clayton,
You can use RadWindow's VisibleOnPageLoad property to show/hide RadWindows via AJAX/Postback. Keep in mind that if show RadWindow via AJAX you should update RadWindowManager(e.g. add RadWindowManager in UpdatePanel)
The radAlert can be shown only via the RadWindowManager's radalert client-side method. If you want to show a radalert after AJAX you should use ScriptManager.RegisterStartupScript to run a script, which will open a radAlert once the AJAX call is finished.
The code below illustrates several ways of creating RadWindows/radAlerts - please choose the one which is most suitable for your needs.
ASPX:
Codebehind:
protected
void
btnShowAlreadyCreatedWindow_Click(
object
sender, EventArgs e)
{
RadWindow1.VisibleOnPageLoad =
true
;
}
protected
void
btnShowNewWindow_Click(
object
sender, EventArgs e)
{
RadWindow win =
new
RadWindow();
win.ID =
"NEWRADWINDOW"
;
win.VisibleOnPageLoad =
true
;
RadWindowManager1.Windows.Add(win);
}
protected
void
btnShowNewWindowUsingRadWindowClientAPI_Click(
object
sender, EventArgs e)
{
String script =
"function _openNewWindow(){{ "
+
"Sys.Application.remove_load(_openNewWindow);"
+
" oMgr = GetRadWindowManager();"
+
" oWnd.set_title('NEW TITLE');"
+
"}};"
+
"Sys.Application.add_load(_openNewWindow);"
;
ScriptManager.RegisterStartupScript(
this
,
this
.GetType(),
"openNewWindow"
, script,
true
);
}
protected
void
btnShowRadAlert_Click(
object
sender, EventArgs e)
{
String script =
"function _openRadAlert(){{ "
+
"Sys.Application.remove_load(_openRadAlert);"
+
" radalert('<h3>SOME TEXT</h3>', null, null, 'Result');"
+
"}};"
+
"Sys.Application.add_load(_openRadAlert);"
;
ScriptManager.RegisterStartupScript(
this
,
this
.GetType(),
"openRadAlert"
, script,
true
);
}
Let us know if you have any other questions.
Kind regards,
Petio Petkov
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items