Passing Args Client-Side to Client-Side with Radopen

2 posts, 0 answers
  1. Alan Shaw
    Alan Shaw avatar
    2 posts
    Member since:
    Apr 2007

    Posted 05 Jul Link to this post

    I'm modernizing some really old code that used the old Rad toolkit.  I found that the "argument" property is not persisting.  I was able to change the window's close code around to pass the element in the close() function, but can't find a way to do this when opening the form.  I'm using VS2013 with ASP.NET AJAX and Telerik.Web.UI v2015.3.930.45.

    Please take a look and advise.  I don't want to make a round-trip to the server for this.  I also found that javascript globals do not persist between postbacks.  So I can't use that sloppy method either.  FYI - I keep the window open and the user may initiate a number of postbacks with an runat=server asp:button before I close it from the client side.


    Javascript being called from a client-side radmenu click on the main page.  "notesExist" is a string value.

    function ShowNotesForm(id, notesExist) {

        var oWnd = window.radopen("Dialogs/Notes.aspx?DocID=" + id, "NotesDialog");
        oWnd.argument = notesExist;



    Javascript within my Notes.aspx:


            <telerik:RadScriptBlock runat="server">
                <script type="text/javascript">
                    $(document).ready(function () {


    I've tried reading GetRadWindow().Argument in other sections like after a button-click on the client-side, but put it here to make it easy to replicate on your end.


  2. Marin Bratanov
    Marin Bratanov avatar
    3555 posts

    Posted 06 Jul Link to this post

    Hi Alan,

    JavaScript variables do not persist after postbacks because the entire page is disposed.

    What you can look into is using AJAX an ensure the objects that contain your custom fields are not part of the response.

    In this case the "argument" field in the client-side object of the RadWindow is merely a custom field you can add to any JavaScript object, and it behaves like one, so you should avoid disposing it.

    Another very important note is that JavaScript is case-sensitive, so the fields must have exactly the same names. In the provided snippet the "a" in "argument" is lowercase when set, but is read with an uppercase letter in the content page. You should unify that.

    The following article shows an example usage of this approach that you can use to compare:


    Marin Bratanov
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. DevCraft R3 2016 release webinar banner
Back to Top