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

Open Window Full Height/Width

3 Answers 464 Views
Window
This is a migrated thread and some comments may be shown as answers.
rdochert
Top achievements
Rank 1
rdochert asked on 14 Jan 2008, 06:48 PM
Was surprised not to find this in the forum already since it is always a popular topic :)

i'd like to get my radwindow opened full width please.

so far i have this (the second window is the important one):

    <radw:radwindowmanager id="RadWindowManager1" runat="server" Skin="Default2006">
        <Windows>
            <radw:RadWindow ID="statsWindow" runat="server" Title="Message Stats"
                Height="400px" Width="600px" ReloadOnShow="true" Modal="true"
                Skin="Default2006" VisibleStatusbar="false" />
            <radW:RadWindow ID="mailerWindow" runat="server" Title="View Mailer"
                Height="100%" Width="100%" Modal="true" InitialBehavior=Maximize
                Skin="Default2006" VisibleStatusbar="false" />
        </Windows>
    </radW:RadWindowManager>




and open the window in this way:

    <script type="text/javascript">
            function showStats(id, rowIndex)
            {
                var grid = window["<%= RadGrid1.ClientID %>"];
               
                var rowControl = grid.MasterTableView.Rows[rowIndex].Control;
                grid.MasterTableView.SelectRow(rowControl, true);
                           
                window.radopen("MailSentStats.aspx?nID=" + id, "statsWindow");
                return false;
            }
            function showMailer(id, rowIndex)
            {
                var grid = window["<%= RadGrid1.ClientID %>"];
               
                var rowControl = grid.MasterTableView.Rows[rowIndex].Control;
                grid.MasterTableView.SelectRow(rowControl, true);
                           
                window.radopen("MailViewer.aspx?nID=" + id, "mailerWindow");
                return false;
            }
    </script>


i've tried various settings for the height, width and initialbehaviour without any success (on IE7 and firefox).
thanks,
rob

3 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 15 Jan 2008, 12:12 PM
Hello rdochert,

The RadWindow's dimensions cannot be set in percents - the Width and Height properties accept values in pixels only.
What I can suggest in your case is to use the client-side maximize() method after opening the RadWindow:

function showMailer(id, rowIndex) 
    var grid = window["<%= RadGrid1.ClientID %>"]; 
    
    var rowControl = grid.MasterTableView.Rows[rowIndex].Control; 
    grid.MasterTableView.SelectRow(rowControl, true); 
                
    var oWnd = window.radopen("MailViewer.aspx?nID=" + id, "mailerWindow"); 
    oWnd.maximize(); 
    return false


Best wishes,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
rdochert
Top achievements
Rank 1
answered on 17 Jan 2008, 10:03 AM
can you tell me what i need to do to make this work in an ajaxified grid? as soon as i add ajax support via ajaxmanager, ajaxmanagerproxy, the client side model fails with an "undefined" javascript error.

the code i was attempting to run after consulting forum posts was:

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

<script type="text/javascript">

function showStats(id, rowIndex)

{

var grid = $find["<%= RadGrid1.ClientID %>"];

var rowControl = $find("<%=RadGrid1.ClientID%>").get_masterTableView().Rows[rowIndex].Control;

grid.get_masterTableView().SelectRow(rowControl,

true);

window.radopen(

"MailSentStats.aspx?nID=" + id, "statsWindow");

return false;

}

function showMailer(id, rowIndex)

{

var grid = $find["<%= RadGrid1.ClientID %>"];

var rowControl = grid.get_masterTableView().Rows[rowIndex].Control;

grid.get_masterTableView().SelectRow(rowControl,

true);

window.radopen(

"MailViewer.aspx?nID=" + id, "mailerWindow");

return false;

}

</script>

</telerik:RadCodeBlock>

0
Rosen
Telerik team
answered on 18 Jan 2008, 12:59 PM
Hi rdochert,

As RadGrid's Prometheus client-side API (compared to the classic version) has been changed to follow the MS Ajax's conventions, you cannot use old javascript methods' signatures. For example of how to use RadWindow for editing you can refer to this forum thread. Please note that you have few syntax's errors in your javascript code. As $find is a method and it should be called with parentheses. For details on how to use MS Ajax please see the online documentation here.

Greetings,
Rosen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Window
Asked by
rdochert
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
rdochert
Top achievements
Rank 1
Rosen
Telerik team
Share this question
or