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

6 posts, 0 answers
  1. G S S
    G S S avatar
    12 posts
    Member since:
    Sep 2007

    Posted 10 Apr 2009 Link to this post

    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

  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 13 Apr 2009 Link to this post

    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.
  3. G S S
    G S S avatar
    12 posts
    Member since:
    Sep 2007

    Posted 13 Apr 2009 Link to this post

    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?

  4. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 13 Apr 2009 Link to this post

    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.
  5. G S S
    G S S avatar
    12 posts
    Member since:
    Sep 2007

    Posted 13 Apr 2009 Link to this post

    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?

  6. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 14 Apr 2009 Link to this post

    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.
Back to Top