Creating parent-child relationships between RadWindows and passing data between them

4 posts, 0 answers
  1. Telerik Admin
    Telerik Admin avatar
    1679 posts
    Member since:
    Oct 2004

    Posted 03 Jul 2014 Link to this post

    Requirements

    Telerik Product and Version

    UI for ASP.NET AJAX, all versions

    Supported Browsers and Platforms

    All browsers and platforms supported by UI for ASP.NET AJAX

    Components/Widgets used (JS frameworks, etc.)

    RadWindow

    PROJECT DESCRIPTION

    This sample shows how you can create a parent-child relationship between multiple RadWindows. It is built on top of the Calling functions in windows help article and also uses a custom field in the RadWindow's client-side object to store a reference to the RadWindow that should be considered its parent.

    A common script must be included on all pages that need to take part in this functionality because it offers the main functions that create the connections. Each page needs to define a function with a predefined name that will send and receive data so it can be reused by the common script.

    The sample can be modified further to include more defensive programming to avoid errors or provide error handling; the scripts can be included in a common script your application already uses, etc.

  2. Suzy
    Suzy avatar
    66 posts
    Member since:
    Nov 2014

    Posted 03 Mar 2015 Link to this post

    This post helped me a lot!
    But I also need to post data from the parent to the child without using it in the URL because the data is too large.
    Do hou have a sample of that by any chance?
  3. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3595 posts

    Posted 04 Mar 2015 Link to this post

    Hi Suzy,

    There is no requirement that you should pass data through a querystring. You can store it in a custom field in the JavaScript object of the RadWIndow so you can retrieve it later: http://www.telerik.com/help/aspnet-ajax/window-programming-using-radwindow-as-dialog.html. Here is a basic example (based on the JScript.js file in the original post).

    wnd.__parentBackReference = window
    wnd.__data = myCustomDataObjectInJS;

    where I have left the creation of the  myCustomDataObjectInJS object to your business logic.

    The article I linked creates the "argument" field, my example above creates "__data". What is the name of the field, depends on your preferences, but I would advise using some peculiar notation to be sure you will not override something internal. The two underscores I used above would do the trick.

    Regards,

    Marin Bratanov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  4. Suzy
    Suzy avatar
    66 posts
    Member since:
    Nov 2014

    Posted 10 Mar 2015 Link to this post

    Hi Marin,

    I have another problem after upgrading to telerik version UI for ASP.NET AJAX Q1 2015.

    I get the following error on the add_show function :

    Object doesn't support property or method 'add_show'

    Do you know how to fix this?  Because this is already set live and now no window is showing, so it is urgent :-(

    Kind regards

    Suzy
Back to Top