RadWindow failing to load

3 posts, 0 answers
  1. Ben
    Ben avatar
    7 posts
    Member since:
    Aug 2015

    Posted 03 Aug 2015 Link to this post

    Hi All,

     

    I have an issue with a RadWindow. It's got a RadTabStrip and a RadMultiPage on it.

    On changing the Tab, I postback, and reload the window using :-

     

    radWindow.Visible = True
    Dim script As String = "function f(){$find(""" + radWindow.ClientID & """).show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);"
    ScriptManager.RegisterStartupScript(Me, Me.[GetType](), "key", script, True)

     

    This works most of the time, but occasionally I get the following error (happens more on the WebSever vs Localhost) :-

     

    <script type="text/javascript">
    //<![CDATA[
    function f(){$find("radWindow").show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);
    document.getElementById('vcmValidationSummary').dispose = function() {
        Array.remove(Page_ValidationSummaries, document.getElementById('vcmValidationSummary'));
    }
    //]]>
    </script>

     

    And the Error is "Microsoft JScrips runtime error: Unable to get value of the property 'show'; object is null or undefined".

    It's as if the RadWindow hasn't been loaded. Any ideas where I'm going wrong?

  2. Ben
    Ben avatar
    7 posts
    Member since:
    Aug 2015

    Posted 04 Aug 2015 in reply to Ben Link to this post

    Swapped to use 'VisibleOnPageLoad' instead. Now seems more stable, but would be nice to know why the other failed.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Eyup
    Admin
    Eyup avatar
    3005 posts

    Posted 06 Aug 2015 Link to this post

    Hello Ben,

    I'm glad you've managed to find a viable solution for your scenario. It is difficult to determine the exact cause of the initial error, however, in this scenario you can also use another cool approach - wrap the tabstrip and multipage within a RadAjaxPanel or add them to the AjaxSettings of a RadAjaxManager programmatically:
    http://docs.telerik.com/devtools/aspnet-ajax/controls/ajax/radajaxmanager/how-to/add-ajaxsettings-programmatically
    http://docs.telerik.com/devtools/aspnet-ajax/controls/ajax/troubleshooting/tips-and-tricks-for-ajaxifying-specific-controls#ajaxifying-radmultipage-and-radtabstrip-controls

    This should prevent the postback effect.

    Regards,
    Eyup
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top