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

How to create a window with Statusbar and Titilebar are unvisible?

5 Answers 326 Views
Window
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 26 Jun 2008, 02:04 AM
I have another question.
How to create a window that with VisibleStatusbar and VisibleTitlebar property is false? That is to say,I want to create a window with Statusbar and Titilebar are unvisible.

I use following function to Open a new window. but the Statusbar and Titlebar are still visible.

function OpenWindow(name)
        {
            var wnd = window.radopen("http://www.google.com", name);
            var tdzone = $find("workspace");        
            wnd.maximize();
            wnd.VisibleStatusbar="False";
            wnd.VisibleTitlebar="False"
            wnd.RestrictionZoneID="workspace";
            return false;
        }

Can anybody help me to solve the problem?
Thanks a lot.

5 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 26 Jun 2008, 07:16 AM
Hello John ,

You cannot hide / show the toolbar and statusbar of the RadWindow control by using the client-side API. Only the server-side one allows you to do this.

My suggestion is to declare a separate RadWindow on your page with VisibleTitleBar and VisibleStatusBar properties set to false and to open that RadWindow when needed.



Regards,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
John
Top achievements
Rank 1
answered on 27 Jun 2008, 03:35 AM
Georg,thank you for your kindly help.

I have test your solution. It works well. But I'm  warry about some other thing. If I have several Radwindow in my page,Will these use up a lot of resource and make the page more slowly?

Best regards.
John Liu
0
Georgi Tunev
Telerik team
answered on 27 Jun 2008, 03:07 PM
Hello John ,

In this case you can use 2 RadWindowManagers - one of them with VisibleStatusBar and VIsibleTitleBar set to false. This way, when you need to open a RadWindow, you will only need to get a reference to the appropriate RadWindowManager and then call its open() method.

For convenience I attached a small sample to this thread that shows the described approach.



Greetings,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
John Davis
Top achievements
Rank 2
answered on 20 Oct 2008, 07:25 PM

I want to open a window when user clicks a link in a row of a grid.  I followed this example:

http://demos.telerik.com/ASPNET/Prometheus/Controls/Examples/Integration/GridAndWindow/DefaultCS.aspx?product=grid

The window displays but it does not have the attributes I set in the aspx.  It does NOT have the specified skin and it is not maximized and  VisibleStatusbar="false" did not work (the bar shows).

I have 2 windows that share the same window manager.  One window, RadWindow1, is activated by an html button. It works fine.
But RadWindowSku is activated by clicking a link in the grid. It displays with default attributes, not those I set in the aspx.
e.g. InitialBehavior="Maximize"  but window is not maximized
     Skin="Vista" but this skin is not displayed
     Title="SKU DETAILS"  but there is not title
     VisibleStatusbar="false"  but the status bar displays

in code behind:
 protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
        {
            PopulateOnPrerender = false;
            if (e.Item is GridDataItem)
            {

                HyperLink editLink = (HyperLink)e.Item.FindControl("dLink");
                editLink.Attributes["href"] = "#";
                editLink.Attributes["onclick"] = String.Format("return ShowWin('{0}','{1}');", e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["SCS_SKU_ID"], e.Item.ItemIndex);
            }
        }

<rad:RadCodeBlock ID="RadCodeBlock1" runat="server">
   <script type="text/javascript">
    function ShowWin(id, rowIndex)
   {
       var grid = $find("<%= RadGrid1.ClientID %>");
       var rowControl = grid.get_masterTableView().get_dataItems()[rowIndex].get_element();
       grid.get_masterTableView().selectItem(rowControl, true);
       window.radopen("BalanceDetailSku.aspx?SKU=" + id, "RadWindowSku");
       return false;
   }
   </script>
</rad:RadCodeBlock>
<table width="800" border="0" cellspacing="0" cellpadding="0">
 <tr>
  <td>
<asp:Label ID="lblMsg" runat="server"></asp:Label>
 </td>
 </tr>
 <tr>
  <td>
  <div style="background: url(Images/bgMedBlue1000.jpg) no-repeat; padding: 7px 5px; width:992px;">
     <div style="font-size:16px;font-weight: bold;color:#15428b;padding: 4px 30px;"><table border="0">
<tr>
<td>Detailed Report</td>
<td><button id="HtmlButton" class="btn" style="width:170px;background-color:transparent"> <img src="Images/txtfile.png" alt="Details" /> Show Balance Details</button> </td>
</tr>
</table>
</div>
 <rad:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" Width="75px" Transparency="50">
 <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' style="border:0;" />
 </rad:RadAjaxLoadingPanel>
<rad:RadGrid ID="RadGrid1" Skin="WebBlue" runat="server" DataKeyNames="SCS_SKU_ID"
Width="991px" PageSize="40" AllowPaging="True" AutoGenerateColumns="False"
DataSourceID="ObjDataSource1" ShowStatusBar="True" EnableAJAX="true" EnableAJAXLoadingTemplate="true"
LoadingTemplateTransparency="50" OnPreRender="RadGrid1_PreRender" OnItemCreated="RadGrid1_ItemCreated"
GridLines="None" Font-Bold="False"
 Font-Italic="False" Font-Overline="False" Font-Size="X-Small"
 Font-Strikeout="False" Font-Underline="False" Height="555px"
>
 <AlternatingItemStyle Font-Bold="False" Font-Italic="False"
  Font-Overline="False" Font-Size="X-Small" Font-Strikeout="False"
  Font-Underline="False" Wrap="True" />
 <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"
  Font-Size="X-Small" Font-Strikeout="False" Font-Underline="False"
  Wrap="True" />
<PagerStyle Mode="Slider" />
<ClientSettings>
 <Selecting AllowRowSelect="true" />
 <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True"></Scrolling>
</ClientSettings>
<MasterTableView CommandItemDisplay="Top" DataKeyNames="SCS_SKU_ID" DataSourceID="ObjDataSource1"
AutoGenerateColumns="False" Width="985px"
  TableLayout="Fixed" font-bold="False" font-italic="False" font-overline="False"
  font-size="X-Small" font-strikeout="False" font-underline="False" >
 <RowIndicatorColumn Visible="False">
  <HeaderStyle Width="20px"></HeaderStyle>
 </RowIndicatorColumn>
 <ExpandCollapseColumn Visible="False" Resizable="False">
  <HeaderStyle Width="20px"></HeaderStyle>
 </ExpandCollapseColumn>
 <Columns>
<rad:GridBoundColumn DataField="SCS_SKU_ID" HeaderText="SCS_SKU_ID" UniqueName="SCS_SKU_ID" Visible="false" />
<rad:GridBoundColumn DataField="SCS_SKUnum" HeaderText="SCS_SKUnum" UniqueName="SCS_SKUnum" />
<rad:GridBoundColumn DataField="CCR" HeaderText="CCR" UniqueName="CCR" />
<rad:GridBoundColumn DataField="SCS_SKU" HeaderText="SCS_SKU" UniqueName="SCS_SKU" />
<rad:GridBoundColumn DataField="PGC" HeaderText="PGC" UniqueName="PGC" />
<rad:GridBoundColumn DataField="RCAP" HeaderText="RCAP" UniqueName="RCAP" />
<rad:GridBoundColumn DataField="LBQ" HeaderText="LBQ" UniqueName="LBQ" />
<rad:GridBoundColumn DataField="BIQ" HeaderText="BIQ" UniqueName="BIQ" />
<rad:GridBoundColumn DataField="EOD" HeaderText="EOD" UniqueName="EOD" />
<rad:GridBoundColumn DataField="TGTq" HeaderText="TGTq" UniqueName="TGTq" />
<rad:GridBoundColumn DataField="Short" HeaderText="Short" UniqueName="Short" />
<rad:GridBoundColumn DataField="BCR" HeaderText="BCR" UniqueName="BCR" />
<rad:GridBoundColumn DataField="DOSb" HeaderText="DOSb" UniqueName="DOSb" />
<rad:GridBoundColumn DataField="DOSe" HeaderText="DOSe" UniqueName="DOSe" />
<rad:GridBoundColumn DataField="TBOH" HeaderText="TBOH" UniqueName="TBOH" />
<rad:GridBoundColumn DataField="WIPa" HeaderText="WIPa" UniqueName="WIPa" />
<rad:GridBoundColumn DataField="WIPb" HeaderText="WIPb" UniqueName="WIPb" />
<rad:GridBoundColumn DataField="DI" HeaderText="DI" UniqueName="DI" />
<rad:GridBoundColumn DataField="DO" HeaderText="DO" UniqueName="DO" />
<rad:GridBoundColumn DataField="DOSrs" HeaderText="DOSrs" UniqueName="DOSrs" />
<rad:GridBoundColumn DataField="DOSr" HeaderText="DOSr" UniqueName="DOSr" />
<rad:GridBoundColumn DataField="Cost" HeaderText="Cost" UniqueName="Cost" />
<rad:GridBoundColumn DataField="PGC2" HeaderText="PGC2" UniqueName="PGC2" />
<rad:GridTemplateColumn UniqueName="TemplateEditColumn">
<ItemTemplate>
  <asp:HyperLink ID="dLink" runat="server" Text="Details"></asp:HyperLink>
</ItemTemplate>
</rad:GridTemplateColumn>
</Columns>
 <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"
     Font-Size="X-Small" Font-Strikeout="False" Font-Underline="False"
     Wrap="True" />
 <AlternatingItemStyle Font-Bold="False" Font-Italic="False"
     Font-Overline="False" Font-Size="X-Small" Font-Strikeout="False"
     Font-Underline="False" Wrap="True" />
  <CommandItemTemplate>
     <div style="padding: 10px 0px;">
   </div>
 </CommandItemTemplate>
    </MasterTableView>
<FilterMenu Skin="WebBlue" EnableTheming="True">
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
</FilterMenu>
   </rad:RadGrid>
   </div>
   <rad:RadWindowManager
   id="Singleton"                
   Behaviors="close, minimize, maximize, Move"
   runat="server">
   <windows>
    <rad:RadWindow ID="RadWindow1"
     Height="500px"
     Width="540px"
     Runat="server"
     Skin="Vista"
     Title="BALANCE DETAILS"
     VisibleStatusbar="false"
     openerElementId="HtmlButton"
     NavigateUrl="~/BalanceDetail.aspx" >
    </rad:RadWindow>
     <rad:RadWindow ID="RadWindowSku"
     InitialBehavior="Maximize"
     Runat="server"
     ReloadOnShow="true"
     Skin="Vista"
     Title="SKU DETAILS"
     VisibleStatusbar="false"
     NavigateUrl="~/BalanceDetailSku.aspx" >
    </rad:RadWindow>
   </windows>
   </rad:RadWindowManager>

0
Georgi Tunev
Telerik team
answered on 22 Oct 2008, 10:45 AM
Hello John,

Your code looks fine. Could you please send us a small sample project where the problem can be reproduced? We will check it and get back to you right away.


Best wishes,
Georgi Tunev
the Telerik team

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