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

Close Rad Window with Rad Grid Item Command

1 Answer 78 Views
Window
This is a migrated thread and some comments may be shown as answers.
alias
Top achievements
Rank 1
alias asked on 19 Apr 2012, 05:34 PM
hi telerik


i have radgrid inside user control, this user cotrol inside  ContentTemplate of rad window,
i want  select a row from rad grid and click a button on command button from grid and fire Rad Grid Item Command to store data to session and Close Rad Window.

1. rad window in content page.
2. script manager in master page

please help me for close rad window after data store in session.


plz HELP.

sorry for mu weak english.

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 23 Apr 2012, 01:15 PM
Hi,

You can inject a script from the code-behind that will close the RadWindow. More details about doing this are available in the following help article: http://www.telerik.com/help/aspnet-ajax/radwindow-troubleshooting-javascript-from-server-side.html. You will most likely need to traverse the Page controls tree to get the RadWindow object and its ClientID which you need for the $find() call. Since you are calling the script from a user control the syntax that will most likely work well for you is the following:
ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "someKey", "$find('" + yourRadWindow.ClientID + "').close();", true);

which assumes the contents of the RadWnidow use Ajax and do not dispose the entire page.

Kind 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.
Tags
Window
Asked by
alias
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or