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

close radwindow with C# (code behind)

4 Answers 459 Views
Window
This is a migrated thread and some comments may be shown as answers.
Hugo
Top achievements
Rank 1
Hugo asked on 09 Aug 2011, 07:24 PM
Hi all

Im new with this Telerik controls and I need your help.
Im working with RadWindow like popup, I show this popup for edit a item from radgrid, and I want close this radwindow from a button inside  radwindow. I dont want use javascript, then I need close with C#, there are some way to do this?

Thank you for you attention

4 Answers, 1 is accepted

Sort by
0
Kevin
Top achievements
Rank 2
answered on 09 Aug 2011, 09:00 PM
Hello Hugo,

If you're not using the ContentTemplate of the RadWindow to render the button, there is no way of closing the RadWindow using code-behind methods, outside of having it output a javascript method to close the window when the button is pressed.
0
Hugo
Top achievements
Rank 1
answered on 09 Aug 2011, 09:57 PM
Hello Kevin.

Thank you for your answer, so I will use javascript function to close my RadWindow.
Excuse me, other question:
When I close my RadWindow, how can I Refresh a RadGrid of my Page?


NOTE: In my RadWindow I'm using an  *.aspx page, Im not use contentTemplate.

Thank you again!!



0
Kevin
Top achievements
Rank 2
answered on 10 Aug 2011, 12:58 PM
Hello Hugo,

You can handle the OnClientClose event of the RadWindow and in there call the rebind client-side method of the RadGrid. Like so:

function OnClientClose(sender, args){
    var masterTable = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
    masterTable.rebind();
}

I hope that helps.
0
Hugo
Top achievements
Rank 1
answered on 10 Aug 2011, 04:50 PM
Hi Kevin.

Thank you for your help, I Followed your steps and works well.

Good Day
Tags
Window
Asked by
Hugo
Top achievements
Rank 1
Answers by
Kevin
Top achievements
Rank 2
Hugo
Top achievements
Rank 1
Share this question
or