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

[Solved] Return a value from popup window to calling page

4 Answers 372 Views
Window
This is a migrated thread and some comments may be shown as answers.
Bob
Top achievements
Rank 1
Bob asked on 13 May 2008, 07:12 PM
Hi all,

I have a button on a web page.  When clicked, a radWindow pops up.  The popup radWindow contains a radgrid.  On each row in the radGrid there is a <asp:LinkButton>.  Up to this point, everything works fine. 

Now when I click this linkbutton,  I want to return the DataKeyNames value to the main calling web page and close the popup window.  How do I do this?  I think I would want to do this in the ItemCommand event for the radGrid like:

Protected

Sub rgEntities_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles rgEntities.ItemCommand

Select Case e.CommandName

Case "Select"

' Return EntityID and close popup window

End Select

End Sub

So how do I do this?

Thanks,
Bob

4 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 15 May 2008, 02:14 PM
Hello Bob,

I suggest to examine this online demo which demonstrates how to return values from a RadWindow through its argument. 

As to RadWindow's closure from server side I suggest to execute the standard javascript function which closes the window from the server. This can be done in several ways which are explained here.

In case you need further assistance, please open a new support ticket and send a small, fully runnable project (including a DB, if needed) with a detailed explanation of the experienced problem and the desired behavior.

Regards,
Svetlina
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Bob
Top achievements
Rank 1
answered on 15 May 2008, 03:41 PM
Svetlina,

As a test, I created a web page and followed your example and my popup window works and also returns a value.  But my application is different.  I want the pop-up to be called when a search button is clicked on a user control.  But now I get this error:

OnClientClose is undefined.

So the example you provided me works fine on a web page (aspx) but does not work with a user control (ascx).  What should I do to fix this?

Thanks,
Bob
0
Svetlina Anati
Telerik team
answered on 17 May 2008, 11:58 AM
Hi Bob,

I assume that the problem is caused by the fact that the User Control is an INaming Container. In order to find the problem I need to examine your code.

Please, open a new support ticket and send me a sample, fully runnable project there (including DB if needed). As soon as I receive it I will do my best to help.



Kind regards,
Svetlina
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
anu
Top achievements
Rank 1
answered on 21 May 2008, 02:26 PM
Hello Bob,

If am not late in giving a reply to you, you can even check this link http://www.telerik.com/support/kb/article/b454K-tee-b454T-cec-b454c-cec.aspx
Tags
Window
Asked by
Bob
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Bob
Top achievements
Rank 1
anu
Top achievements
Rank 1
Share this question
or