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

Autosize is not working.

10 Answers 219 Views
Window
This is a migrated thread and some comments may be shown as answers.
Anto (DLL Version : 2008.3.1314.35)
Top achievements
Rank 2
Anto (DLL Version : 2008.3.1314.35) asked on 06 May 2010, 03:25 PM
Hi All,

Have a master page with RadMenu.

While clicking a menu, a page opens in a popup. For this I have should RadWindowManager.

Works fine.

But each page is of different width. So I used the AutoSize="True", which I found in the telerik demos. But it is not working.

<%@ Control Language="C#" AutoEventWireup="True" CodeBehind="HeaderV2.ascx.cs" Inherits="ProductAdmin.Header" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
  <telerik:RadScriptBlock runat="server" ID="RadScriptBlock1"
 
        <script type="text/javascript"
 
            function rmnuPageClientClicking(sender, eventArgs) { 
                var item = eventArgs.get_item(); 
                var navigateUrl = item.get_value(); 
                if (navigateUrl && navigateUrl != "#") { 
                    var wnd = window.radopen(navigateUrl, null); 
                                       
                    return false; 
                } 
            } 
//            wnd.setSize(515, 345);   
             
          </script> 
 
    </telerik:RadScriptBlock> 
<table border="0" cellpadding="0" cellspacing="0" width="100%"
    <tbody> 
        <tr> 
            <td id="header"
                <table border="0" cellpadding="0" cellspacing="0" width="100%"
                    <tbody> 
                        <tr> 
                            <td style="width: 100%;" valign="top"
                                <table cellpadding="0" cellspacing="0"
                                    <tr> 
                                        <td> 
                                            <telerik:RadMenu runat="server" ID="rmnuProducts" DataTextField="ProductName" DataFieldID="ProductID" 
                                                DataFieldParentID="ParentID" DataValueField="ProductID" Skin="Vista" OnItemClick="rmnuProducts_ItemClick"
                                            </telerik:RadMenu> 
                                        </td> 
                                        <td> 
                                            <telerik:RadMenu Width="100%" runat="server" ID="rmnuPage" DataTextField="PseudoName" 
                                                DataFieldID="UID" DataFieldParentID="ParentID"  
                                                 
                                                DataValueField="PageNavigateURL" 
                                                OnClientItemClicking="rmnuPageClientClicking" 
                                                 
                                                 CollapseAnimation-Type="OutSine" Skin="Vista" 
                                                EnableAutoScroll="true"
                                            </telerik:RadMenu> 
                                             
                                            <%--OnItemClick="rmnuPage_ItemClick"--%> 
                                            <%--DataNavigateUrlField="PageNavigateURL"--%> 
                                            <img visible="false" alt="Products" id="productLogo" runat="server" /> 
                                        </td> 
                                        <td> 
                                            <telerik:RadMenu runat="server" ID="RadMenu1" Skin="Vista" OnItemClick="rmnuProducts_ItemClick" Width="100%"
                                                <Items> 
                                                    <telerik:RadMenuItem Text="Home" NavigateUrl="../Home/DefaultCS.aspx"
                                                    </telerik:RadMenuItem> 
                                                    <telerik:RadMenuItem Text="Log Out" NavigateUrl="../Admin/LoginCS.aspx"
                                                    </telerik:RadMenuItem> 
                                                </Items> 
                                            </telerik:RadMenu> 
                                        </td> 
                                    </tr> 
                                </table> 
                            </td> 
                            <%-- <td align="right"
                                <table border="1" cellpadding="0" cellspacing="0"
                                    <tbody> 
                                        <tr> 
                                            <td> 
                                            </td> 
                                            <td class="myArea" align="left"
                                                <%--| <href="../Home/DefaultCS.aspx" class="myAreaLink">Home</a>|<href="../Admin/LoginCS.aspx" 
                                                    class="myAreaLink">Logout</a>--%> 
                            <%--</td> 
                                            <td id="colorpicker" class="welcome" style="border-left: 2px solid rgb(221, 221, 221); 
                                                padding-right: 5px;" nowrap="nowrap" valign="top"
                                            </td> 
                                        </tr> 
                                    </tbody> 
                                </table> 
                            </td>--%> 
                        </tr> 
                        <tr> 
                            <td> 
                                <telerik:RadToolBar runat="server" ID="RTBproducts" OnButtonClick="RTBproducts_ButtonClick"  Skin="Office2007" Width="100%"
                                    <Items> 
                                        <telerik:RadToolBarButton Text="Employee Master" ImagePosition="AboveText" ImageUrl="../iSmart/images/users2.gif"
                                        </telerik:RadToolBarButton> 
                                        <telerik:RadToolBarButton Text="Employee" IsSeparator="true"
                                        </telerik:RadToolBarButton> 
                                        <telerik:RadToolBarButton Text="Leave Master" ImagePosition="AboveText" ImageUrl"../iSmart/images/attend.gif"
                                        </telerik:RadToolBarButton> 
                                        <telerik:RadToolBarButton Text="Leave" IsSeparator="true"
                                        </telerik:RadToolBarButton> 
                                        <telerik:RadToolBarButton Text="Attendance" ImagePosition="AboveText" ImageUrl"../iSmart/images/atendance.gif"
                                        </telerik:RadToolBarButton> 
                                        <telerik:RadToolBarButton Text="Attendan" IsSeparator="true"
                                        </telerik:RadToolBarButton> 
                                        <telerik:RadToolBarButton Text="CTC Master" ImagePosition="AboveText" ImageUrl"../iSmart/images/ctc.gif"
                                        </telerik:RadToolBarButton> 
                                        <telerik:RadToolBarButton Text="CTC" IsSeparator="true"
                                        </telerik:RadToolBarButton> 
                                        <telerik:RadToolBarButton Text="Salary Process" ImagePosition="AboveText" ImageUrl"../iSmart/images/dolr1.gif"
                                        </telerik:RadToolBarButton> 
                                        <telerik:RadToolBarButton Text="Salary" IsSeparator="true"
                                        </telerik:RadToolBarButton> 
                                        <telerik:RadToolBarButton Text="Salary Slip" ImagePosition="AboveText" ImageUrl="../iSmart/images/salslipnew.gif"
                                        </telerik:RadToolBarButton> 
                                        <telerik:RadToolBarButton Text="SalarySlip" IsSeparator="true"
                                        </telerik:RadToolBarButton> 
                                        <telerik:RadToolBarButton Text="Exit" ImagePosition="AboveText" ImageUrl="../iSmart/images/exitnew.gif"
                                        </telerik:RadToolBarButton> 
                                        <telerik:RadToolBarButton IsSeparator="true"
                                        </telerik:RadToolBarButton> 
                                    </Items> 
                                </telerik:RadToolBar> 
                            </td> 
                        </tr> 
                        <%-- <tr> 
                            <td style="padding: 10px 5px 0px 10px;" align="right" nowrap="nowrap" valign="top"
                                <table border="0" cellpadding="0" cellspacing="0"
                                    <tbody> 
                                        <tr> 
                                            <td class="search" >--%> 
                        <%--<telerik:RadTextBox EnableEmbeddedSkins="false" ID="RTBSearch" TabIndex="1" runat="server" 
                                                                MaxLength="20"    > 
                                             </telerik:RadTextBox>--%> 
                        <%--</td><td>--%> 
                        <%--<asp:Button ID="BtnSearch" runat="server" Text="Search" CssClass="button"/>--%> 
                        <%--</td> 
                                        </tr> 
                                    </tbody> 
                                </table> 
                            </td> 
                        </tr>--%> 
                        <%--<tr> 
                            <td colspan="2" align="left"
                            </td> 
                        </tr>--%> 
                        <tr> 
                            <td> 
                                <table border="0" cellpadding="0" cellspacing="0" width="100%"
                                    <tbody> 
                                        <tr> 
                                            <td id="subtabs" width="100%"
                                            </td> 
                                        </tr> 
                                        <tr> 
                                            <td colspan="4" class="lastView" nowrap="nowrap"
                                                <table border="0" cellpadding="0" cellspacing="0" width="100%"
                                                    <tbody> 
                                                        <tr> 
                                                            <td align="left"
                                                                <asp:Label ID="lblPage" runat="server" Text=""></asp:Label> 
                                                            </td> 
                                                            <td align="right"
                                                                <style="white-space: nowrap;">Welcome&nbsp;&nbsp;</b> 
                                                                <asp:Label ID="lblWelcomeBy" runat="server" Text="None"></asp:Label>&nbsp;&nbsp;&nbsp;&nbsp; 
                                                            </td> 
                                                            <td align="right"
                                                                <style="white-space: nowrap;">Last Viewed:&nbsp;&nbsp;</b> 
                                                                <asp:Label ID="lblLastViewed" runat="server" Text="None"></asp:Label>&nbsp;&nbsp; 
                                                            </td> 
                                                        </tr> 
                                                    </tbody> 
                                                </table> 
                                            </td> 
                                        </tr> 
                                    </tbody> 
                                </table> 
                                 <telerik:RadWindowManager ID="RadWindowManager" ReloadOnShow="true" VisibleOnPageLoad="true" Animation="Slide"   
                                 AutoSize="true" ShowContentDuringLoad="false" runat="server" Skin="Vista" 
                                    VisibleStatusbar="false"
                                    <Windows> 
                                        <%-- <telerik:RadWindow ID="RadWindow1" runat="server" ShowContentDuringLoad="false" Width="400px" 
                                            Height="400px" Title="Telerik RadWindow" Behaviors="Default"
                                        </telerik:RadWindow>--%> 
                                    </Windows> 
                                </telerik:RadWindowManager> 
                                 
                                <telerik:RadAjaxManager ID="ramTemp" runat="server"
                        <AjaxSettings> 
                            <telerik:AjaxSetting AjaxControlID="RTBproducts"
                                <UpdatedControls> 
                                    <telerik:AjaxUpdatedControl ControlID="RadWindowManager" LoadingPanelID="LoadingPanel1"/> 
                                </UpdatedControls> 
                            </telerik:AjaxSetting> 
                            <telerik:AjaxSetting AjaxControlID="rmnuPage"
                                <UpdatedControls> 
                                    <telerik:AjaxUpdatedControl ControlID="RadWindowManager" LoadingPanelID="LoadingPanel1" /> 
                                </UpdatedControls> 
                            </telerik:AjaxSetting> 
                            
                        </AjaxSettings> 
                    </telerik:RadAjaxManager> 
                            </td> 
                        </tr> 
                    </tbody> 
                </table> 
            </td> 
        </tr> 
    </tbody> 
</table> 

This the ascx page I am using. Have called the new page through javascript.

It Opens in a window with scroll in both. Need to fit the size of the page.

Have sent a screen shot also.

Is there any possible way to rectify this.

Thank you

-Anto

10 Answers, 1 is accepted

Sort by
0
Denis
Top achievements
Rank 1
answered on 09 May 2010, 11:14 PM
Missing a doctype definition, is most probably the cause for the problem you are experiencing.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  

RadControls suppose that all your pages are xhtml compliant. Use quirks mode only if it is required.

Thanks, Denis.
0
Anto (DLL Version : 2008.3.1314.35)
Top achievements
Rank 2
answered on 11 May 2010, 10:35 AM
Denis

I have added the line in the aspx page.

But even though nothing happened.

It is not working.

-Anto
0
Georgi Tunev
Telerik team
answered on 12 May 2010, 02:21 PM
Hello Anto,

In such case, please open a support ticket and send us a small sample project where this issue could be reproduced. Once we are able to reproduce the problem locally, we will do our best to provide you with a solution.


All the best,
Georgi Tunev
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.
0
Anto (DLL Version : 2008.3.1314.35)
Top achievements
Rank 2
answered on 25 May 2010, 03:01 PM
Hi Georgi Tunev

This is dll 2008.3.1314.35

Is there any option to make the AutoSize property work in this DLL.

-Anto







0
Fiko
Telerik team
answered on 28 May 2010, 02:08 PM
Hi Anto,

The AutoSize feature does not exist in that version of the controls. This is why I recommend you to update to the recent  version.


Greetings,
Fiko
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.
0
Anto (DLL Version : 2008.3.1314.35)
Top achievements
Rank 2
answered on 31 May 2010, 01:43 PM
Hi Fiko

Great, It is a fantastic answer by you.

I have done 95% of the work in the DLL(2008.3.1314.35).

If I have to change it means, Have to redo all the 95% again.

Look, here there is no way of using AutoSize property in this DLL.

Is there any other option to do this.

Thank You

-Anto
0
Accepted
Fiko
Telerik team
answered on 03 Jun 2010, 10:58 AM
Hello Anto,

In such case, I recommend you to implement a custom auto size feature based on the suggestions provided in this KB article.

I hope this helps.

Regards,
Fiko
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.
0
Anto (DLL Version : 2008.3.1314.35)
Top achievements
Rank 2
answered on 05 Jun 2010, 09:30 AM
Hi Fiko

Thank you very much.

My problem is solved.

Ok Thanks a lot.

It works fine, with a small issue.

The Radwindow is not opening in the center.

Is there any option to make it open in the center of the page.

-Anto
0
Fiko
Telerik team
answered on 09 Jun 2010, 04:18 PM
Hello Anto,

You can use the RadWindow's center() client-side method. I recommend you to call it after calling  the autosize code.

All the best,
Fiko
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.
0
Anto (DLL Version : 2008.3.1314.35)
Top achievements
Rank 2
answered on 22 Jun 2010, 08:44 AM
Hi Fiko,

Thank You very much.

-Anto
Tags
Window
Asked by
Anto (DLL Version : 2008.3.1314.35)
Top achievements
Rank 2
Answers by
Denis
Top achievements
Rank 1
Anto (DLL Version : 2008.3.1314.35)
Top achievements
Rank 2
Georgi Tunev
Telerik team
Fiko
Telerik team
Share this question
or