Nested Rad Windows

4 posts, 0 answers
  1. Kim
    Kim avatar
    27 posts
    Member since:
    Sep 2010

    Posted 10 Feb 2012 Link to this post


    I have a grid that when double clicked it pops up a RadWindow, from there i have another gird that can be double clicked to popup a second rad window. I can close this window and the grid rebinds fine, but if i immediately double click again and close the window, it errors on

    $find(

     

    "RadAjaxManager1").ajaxRequest("Rebind")


    To see the problem goto http://www.iytworldwide.com/ click on | Master Files | Schools | double click on first school | click on Courses | Double click any course, close the window, double click on any course again, close the window. In IE bottom left corner you will see a Javascript error "'null' is null or not an object'

    Why does it work the first time but not the second time?


    Also, its not modal even though i have modal=true

     

  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    5811 posts

    Posted 13 Feb 2012 Link to this post

    Hello Kim,

    It is rather difficult to deduce the reason behind this behavior without being able to inspect the actual code. It seems that for some reason the AJAX request does not go well and after that the RadAjaxManager is missing from the page. Can you confirm it is not inside one of its update panels, as it shoud not be? Also, you are opening a new RadWindow from the RadWindowManager with and ID EditCourse, while the modal RadWindow you have separately declared has the AddCourse ID. This is located in the  grdCourses_OnRowDblClick function. This is the reason why it is not modal.

    Now, back to the AJAX issue, do you have the AjaxControlToolkit assembly in your project? We are aware of some cases where the MS AJAX scripts are referenced from this assembly instead of the original MS assemblies, and the version of the scripts that  comes from ACT's dll is modified and does not work properly. If you have this assembly - please remove it from the project (entirely, it does not suffice to only remove references) and see if the issue persists.

    If you are still having difficulties please isolate this issue in a simple, runnable project (no actual business logic, layout or dtasources are needed, just the bare minimum that shows the behavior you are experiencing) and send it back to us so we can examine it. You may find useful this blog post on isolating the sample.


    Kind regards,
    Marin
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. Kim
    Kim avatar
    27 posts
    Member since:
    Sep 2010

    Posted 25 Feb 2012 Link to this post

    Hi,

    After some tinkering (and i'm not sure why it works on first try and not second) i found that the objects have to be in the correct order. I had to put everything in this order in the markup.

    RadScriptManager 
    RadAjaxManager
    Script-telerikClientEvents2

    <body>
    <form>

            <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> 
            </telerik:RadScriptManager> 

        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest"> 
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="grdCourses"> 
            <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="grdCourses" /> </UpdatedControls> 
        </telerik:AjaxSetting> 
        </AjaxSettings> 
        </telerik:RadAjaxManager>


    <script type="text/javascript" id="telerikClientEvents2"> 
        function RadWindowManager1_Close(sender, args) { 
            $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");
    }
    </script>
  4. Kim
    Kim avatar
    27 posts
    Member since:
    Sep 2010

    Posted 25 Feb 2012 Link to this post

    Also, the modal problem is fixed. Thank you it was an oversight on my part.
Back to Top