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

Opening a Radwindow inside RadMultiPage

3 Answers 141 Views
Window
This is a migrated thread and some comments may be shown as answers.
Adesh
Top achievements
Rank 1
Adesh asked on 12 Dec 2011, 12:12 PM
Hi,
    Problem with the opening of radwindow inside a Radmultipage
    My Scenario is as follows :-
    There is a Mypage.aspx that extends a predefined MasterPage.
     Inside Mypage.aspx I have a RadTabstrip which has 4 tabs, for each of the tab I have 
     Radmultipage dedicated to the tab.
     Inside radpageview I have gridview that contains a Commanditem in the form of asp link button;
     On the click of this Button I want to open a Radwindow that is declared in the same content page.
     
     same code to open a radwindow onclick of someButton is working on other pages but for this page its not working.

  so plz help me in this regard and let me know how to open the radwindow inside a radPageview .


With Regards
Adesh Sachan

3 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 13 Dec 2011, 04:45 PM
Hello Adesh,

The code used to open a RadWindow would depend on the page's structure - if there is a RadWindowManager on it or not, if there is more than one also. Generally I would advise that you examine the following help article on the different ways to open a Radwindow: http://www.telerik.com/help/aspnet-ajax/window-programming-opening.html. Please examine this one if you have more than one manager on the page.

Please also keep in mind that the RadWindow is entirely a client-side object, so if you are opening it on the client you must not a perform a full postback - i.e. either cancel the postback from the button, or have it perform an AJAX request that will not dispose the RadWindow / RadWIndowManager.

You may also find this thread useful on opening it from the server if you are already handling the event in the code-behind.

Regards,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Mike
Top achievements
Rank 1
answered on 05 May 2014, 11:57 AM
i an using this code, because it is the only one that worked:
     function ShowExisting2()
            {             
               var oWnd = $find("RadWindow2");
               oWnd.show();
            }


but the thing is that it is showing a white square, without even the menu on top. i have the same situation as 'Adesh', i am trying to open a window from a radgrid contained inside a multipage.

please help
0
Shinu
Top achievements
Rank 2
answered on 06 May 2014, 05:32 AM
Hi Mike,

Please have a look into the sample code snippet which works fine at my end. Please provide your code if it doesn't help.

ASPX:
<telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1">
    <Tabs>
        <telerik:RadTab Text="Grid" Selected="true" PageViewID="RadPageView1">
        </telerik:RadTab>
    </Tabs>
</telerik:RadTabStrip>
<telerik:RadMultiPage ID="RadMultiPage1" runat="server">
    <telerik:RadPageView ID="RadPageView1" runat="server" Selected="true">
        <telerik:RadGrid ID="radgrdOrders" runat="server" DataSourceID="SqlDataSource1" CellSpacing="-1" GridLines="Both">
            <MasterTableView CommandItemDisplay="Top" AutoGenerateColumns="False" DataKeyNames="OrderID">
                <CommandItemTemplate>
                    <asp:LinkButton ID="lnkbtnShowWindow" runat="server" PostBackUrl="#" Text="Open Window" OnClientClick="OpenWindow(); return false;">
                    </asp:LinkButton>
                </CommandItemTemplate>
                <Columns>
                    <telerik:GridBoundColumn DataField="OrderID" DataType="System.Int32" FilterControlAltText="Filter OrderID column" HeaderText="OrderID" ReadOnly="True" SortExpression="OrderID" UniqueName="OrderID">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text="" />
                        </ColumnValidationSettings>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="CustomerID" FilterControlAltText="Filter CustomerID column" HeaderText="CustomerID" SortExpression="CustomerID" UniqueName="CustomerID">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text="" />
                        </ColumnValidationSettings>
                    </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
    </telerik:RadPageView>
</telerik:RadMultiPage>
<telerik:RadWindow ID="RadWindow1" runat="server">
</telerik:RadWindow>

JavaScript:
<script type="text/ecmascript">
    function OpenWindow(sender, args) {
        $find("<%=RadWindow1.ClientID %>").show();
    }
</script>

Thanks,
Shinu.
Tags
Window
Asked by
Adesh
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Mike
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Share this question
or