close radwindow with C# (code behind)

5 posts, 0 answers
  1. Hugo
    Hugo avatar
    11 posts
    Member since:
    Aug 2011

    Posted 09 Aug 2011 Link to this post

    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
  2. Kevin
    Kevin avatar
    360 posts
    Member since:
    Jul 2012

    Posted 09 Aug 2011 Link to this post

    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.
  3. Hugo
    Hugo avatar
    11 posts
    Member since:
    Aug 2011

    Posted 09 Aug 2011 Link to this post

    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!!



  4. Kevin
    Kevin avatar
    360 posts
    Member since:
    Jul 2012

    Posted 10 Aug 2011 Link to this post

    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.
  5. Hugo
    Hugo avatar
    11 posts
    Member since:
    Aug 2011

    Posted 10 Aug 2011 Link to this post

    Hi Kevin.

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

    Good Day
Back to Top