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

Best way to display different content in same RAD Window depending on clicked button in toolstrip?

5 Answers 148 Views
Window
This is a migrated thread and some comments may be shown as answers.
G S S
Top achievements
Rank 1
G S S asked on 10 Apr 2009, 04:02 PM

Hi,

I have a Rad Window and a menu on an ASP.NET MVC app.

I was wondering, what is the best way to load completely different content when a button on the toolbar is clicked?

For example, on page load, I have some welcoming text in the Window, but if I click "skills" in the toolstrip, I would like to eradicate the welcoming text and show a rad data grid, slider, etc? Maybe I need seperate RAD windows but wouldn't this harm performance?

Thanks

5 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 13 Apr 2009, 10:27 AM
Hello G,

You could use separate RadWindow or you could use the client-side API, get a reference to the RadWindow with the welcome message and change its Url by using the setUrl() method. Note that RadWindow is a container (the control itself is based on an IFRAME) and it works with pages that are different from the parent one, e.g. you cannot display in it a content that resides on the same page.


All the best,
Georgi Tunev
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
G S S
Top achievements
Rank 1
answered on 13 Apr 2009, 11:55 AM

I see.

So I have to use the client side API to do that. I was trying to use the server side API (C#). I'm glad there is good documentation on the API.

For the positioning, I can and will just use seperate divs for now.

One other thing: the status bar lists the filename and extension of the url it contains (E.g. if one radwindow has an about.aspx page, in debug mode of the ASP.NET project, this filename and extension is displayed). How can I get rid of this?

0
Georgi Tunev
Telerik team
answered on 13 Apr 2009, 12:36 PM
Hello again,

Do you want to completely remove the status bar or do you want to change the text in it? If you want to remove the statusbar, there is a VisibleStatusBar property that you could set to false.
If however, you want to keep the statusbar, you could override the text in it in the OnClientPageLoad eventhandler by using the setStatus() method.
e.g.
OnClientPageLoad(oWnd)
{
   oWnd.set_status("custom text");
}


I hope this helps.

Best wishes,
Georgi Tunev
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
G S S
Top achievements
Rank 1
answered on 13 Apr 2009, 05:21 PM

I see. I wanted to just remove the text (the enablestatusbar property I had noticed).

Thanks for that.

RE navigateurl/seturl. I think my problems are related to my understanding of what can and can't be done.

For example, this doesn't show an image:

  <telerik:RadWindow VisibleOnPageLoad="true" runat="server" Skin="Black" OffsetElementID="rightbar" Visible="true">
<asp:UpdatePanel runat="server">
<ContentTemplate>

<img alt="" src="Content/logo_home.gif" visible="true" style="margin-left: 15px; width: 133px; height: 60px" /><br />

</ContentTemplate>

</asp:UpdatePanel>

</telerik:RadWindow>

My site is based on one page (now possible with rad controls).

With regards to what I want to do, how can I add a radmenu inside the radwindow and show it? Everytime I attempt to do ths, the radmenu doesn't show or the radmenu and the radwindow both don't show. This code doesn't show anything:

<div id="rightbar" 
style="position: relative; top: -482px; left: 595px; height: 403px; width: 564px;">


<telerik:RadWindow VisibleOnPageLoad="true" runat="server" Skin="Black" OffsetElementID="rightbar" Visible="true">

<telerik:RadMenu Visible="true" runat="server">
</telerik:RadMenu>
<asp:UpdatePanel runat="server">

<ContentTemplate>



</ContentTemplate>

</asp:UpdatePanel>

</telerik:RadWindow>


</div>

It seems like I can only have a webpage (Set in the navigateUrl property), which will have my radMenu. The radwindow will be on the homepage. Is there a working example of what I am trying to do?

0
Georgi Tunev
Telerik team
answered on 14 Apr 2009, 07:55 AM
Hello G S S,

Indeed, as I noted in my initial reply, RadWindow is a container based on an IFRAME - it can only work with external pages that are set with the NavigateUrl property. We are planning to add an option to show in RadWindow a content from the same page, however this will happen later this year. Currently for scenarios where you need to have the content on the same page, we suggest to check RadToolTip or RadDock.



All the best,
Georgi Tunev
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
Window
Asked by
G S S
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
G S S
Top achievements
Rank 1
Share this question
or