MDI - get reference to control in window

3 posts, 0 answers
  1. wnl
    wnl avatar
    106 posts
    Member since:
    Aug 2007

    Posted 15 Feb 2012 Link to this post

    I'm using your demo about MDI - 

    I open 2 windows (for view data (radgrid) and for edit)

    I want to get a reference to RadGrid in the 1. window when I click on tab to open 2. window but I don't know how.
    Next I want to get selected row from RadGrid, get some values from there and pass to the second window with url - there is no problem.
    With one window there is no problem:

    var grid = $find("<%= rgMain.ClientID %>");

    I don't know how to do it in this online example

  2. wnl
    wnl avatar
    106 posts
    Member since:
    Aug 2007

    Posted 16 Feb 2012 Link to this post

    Any ideas?
  3. Marin Bratanov
    Marin Bratanov avatar
    5929 posts

    Posted 16 Feb 2012 Link to this post


    You can find an example how to call a function in a different RadWIndow in this help article: You can declare a function in the page with the grid  that will reference the grid and generally perform the needed custom functionality you have in mind. This function can then simply return the result to the main page, from where you can pass it to the second RadWindow easily by using the approach illustrated in this article: What is important in your case is to store references in global JS variables to these two RadWindows so you can actually get this working. This is easiest done when opening them - for example by checking for a certain URL, title or something else, depending on your custom logic.

    Kind regards,
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top