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

Open a radwindow from another radwindow by using parent page window manager?

1 Answer 119 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
V asked on 20 Sep 2010, 08:22 PM

I have a RadWindow where a user can enter some "Item Information" (AddItem.aspx)

I also have a RadWindow where a user can see a list of the Items (ItemHistory.aspx) they have entered (shown in a RadGrid). I'm trying to set it up to where when a user clicks on the ID of an item in the grid, the item ID is then passed to the AddItem.aspx page, where they can edit the information they have entered.

I'm extremely stuck :(

Is there any way I can use the parent page's window manager and javascript function to open the AddItem.aspx window (I'm passing in various required parameters already). This would be preferrable since the parameters (last modified date, etc) are only available from the parent page.


function ShowAddItemWindow(Id) {
                var LastModifiedDateHF = $get('<%=LastModifiedDateHF.ClientID%>');
                var CurrentStateHF = $get('<%=CurrentStateHF.ClientID%>');
                window.radopen("item/AddItem.aspx?parentId=" + Id + "&itemId=-1&lastmodifieddate=" + LastModifiedDateHF.value + "┬Ątstate=" + CurrentStateHF.value, "addItemWin");
                return false;

<telerik:RadGrid ID="radItemHistoryGrid" runat="server" AutoGenerateColumns="false"
            GridLines="None" Skin="Vista" ShowHeader="true" PageSize="12" AllowPaging="true"
            OnNeedDataSource="radItemHistoryGrid_OnNeedDataSource" OnItemDataBound="radItemHistoryGrid_OnItemDataBound"
            <PagerStyle Mode="NextPrevAndNumeric" />
            <AlternatingItemStyle BackColor="#efefef" />
            <HeaderStyle Font-Bold="true" />
                <Selecting AllowRowSelect="true" />
                <ClientEvents OnRowSelected="ShowAddItemWindow" />
            <MasterTableView NoMasterRecordsText="No Items found" Name="TblView"
                ShowHeader="true" DataKeyNames="Id" AllowMultiColumnSorting="false"
                HierarchyLoadMode="ServerOnDemand" Width="100%" CommandItemDisplay="Top">
                    <telerik:GridBoundColumn DataField="Id" HeaderText="Id" UniqueName="Id" Visible="false">
                    <telerik:GridTemplateColumn DataField="ItemId" HeaderText="Item ID" UniqueName="ItemId"
                            <asp:LinkButton ID="link1" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "ItemId")%>'></asp:LinkButton>

So when a user selects the LinkButton, the ItemId is passed back to the parent page, then the Parent Page's javascript function to open the AddItem.aspx page is called passing in the selected ItemId (as well as the other parameters that are required and only available from the parent page)!

Can anyone help???

Thanks in advance!

1 Answer, 1 is accepted

Sort by
Georgi Tunev
Telerik team
answered on 22 Sep 2010, 02:04 PM
Hi V,

I believe that the following help topic will be of help: Calling Functions Between Windows. The logic there is used in the Returning Values from a Dialog demo that shows how to build the communication between the parent page and 2 RadWindows. You can examine the code of the demo in the Description section (click on the triangle button next to the page's name in the "Example Source Code & Description" section to open the dropdown with all available pages).

Sincerely yours,
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
Asked by
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question