10 Answers, 1 is accepted

Try the following approach for setting custom text for status bar of radwindow.
ASPX:
<telerik:RadWindow ID="RadWindow1" runat="server" NavigateUrl="MyPage.aspx" |
OnClientPageLoad="ClientShow" Title="My Title" VisibleOnPageLoad="True" > |
</telerik:RadWindow> |
JavaScript:
<script type="text/javascript"> |
function ClientShow() |
{ |
var oWindow = $find("<%=RadWindow1.ClientID%>"); |
oWindow.set_status("Custom Text"); |
} |
</script> |
Shinu.

I get:
Server Error in '/RadWindowStatusBar' Application.
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
Exception Details: System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
What is wrong?

You need to make sure that the JavaScript is wrapped in either a <telerik:RadCodeBlock></telerik:RadCodeBlock> or <telerik:RadScriptBlock></telerik:RadScriptBlock> pair.
See this help page for more details.
--
Stuart

The second task which I want to make is: How to pass some value ( string value from c# code) to set_status javascript function?
I prepare in c#:
string status = "Some txt"; |
and I want to have statusbar with this text above.
How is the best way to achieve this?

You haven't said how you're opening the window (directly from client-side or by making a JavaScript call from server-side) so it's not possible to say what id best for how you're operating.
However, one way would be to add a hidden field on the page that contains the RadWindow control.Then, in your code-behind, assign the value for your status bar text to that control. Finally, in your ClientShow JavaScript function, take the value from your hidden input and us it as the paramater to the set_status method.
Something like this:
Markup ...
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm10.aspx.cs" Inherits="WebApplication1.WebForm10" EnableEventValidation="false" %> | |
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head runat="server"> | |
<title></title> | |
</head> | |
<body> | |
<form id="form1" runat="server"> | |
<telerik:RadScriptManager ID="RadScriptManager1" runat="server"> | |
</telerik:RadScriptManager> | |
<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server"> | |
<script type="text/javascript"> | |
function ClientShow() { | |
var oWindow = $find("<%=RadWindow1.ClientID%>"); | |
var hiddenInput = $get("<%= HiddenField1.ClientID %>"); | |
oWindow.set_status(hiddenInput.value); | |
} | |
</script> | |
</telerik:RadScriptBlock> | |
<telerik:RadWindow ID="RadWindow1" runat="server" NavigateUrl="http://www.telerik.com" | |
OnClientPageLoad="ClientShow" Title="My Title" VisibleOnPageLoad="True" > | |
</telerik:RadWindow> | |
<asp:HiddenField ID="HiddenField1" runat="server" Value=""/> | |
</form> | |
</body> | |
</html> |
Code-behind ...
using System; | |
namespace WebApplication1 | |
{ | |
public partial class WebForm10 : System.Web.UI.Page | |
{ | |
protected void Page_Load(object sender, EventArgs e) | |
{ | |
HiddenField1.Value = String.Format("The time is: {0}", DateTime.Now); | |
} | |
} | |
} |
Hope this helps.
--
Stuart

nice idea:) I'm opening with JavaScript call from server-side
Is the way to do this without hidden field and call set_status in Page_Load an then pass custom value?

There are many different ways to skin this particular cat.
--
Stuart
For your convenience I have prepared a simple project that demonstrates a possible solution without using HiddenField.
I am not quite sure what are the sequence of the steps that you take in order to change the status text, but please note the following scenario :
You open the window(by using radopen() or oWindow.show()) for the first time (or the ReloadOnShow is set to true), the content page(that is loaded inside the RadWindow) is from the same domain and the content page contains text between its <title> tags. In this case the following code does not change the status text of the newly opened RadWindow.
var oWindow = $find("<%= RadWindow1.ClientID %>"); |
oWindow.show(); |
oWindow.set_status(myStatusText); |
This is because of that the RadWindow control gets the value between the <title> tag of the content page(after it is loaded) and shows it as a status text. You can avoid this behavior by calling the set_status function in the OnClientPageLoad event of the RadWindow(implemented in the attached demo).
I hope this helps.
Sincerely yours,
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.

The RadWindow control does not contain method or property that can be used in order to set the status text of the window. The approach showed in my previous answer is the only way to set a text (the value of the text is from the server) to the status bar of the RadWindow .
Regards,
Fiko
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.