This is a migrated thread and some comments may be shown as answers.

Nested Rad Windows

3 Answers 73 Views
Window
This is a migrated thread and some comments may be shown as answers.
Kim
Top achievements
Rank 1
Kim asked on 10 Feb 2012, 11:41 PM

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

 

3 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 13 Feb 2012, 01:41 PM
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 >>
0
Kim
Top achievements
Rank 1
answered on 26 Feb 2012, 05:11 AM
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>
0
Kim
Top achievements
Rank 1
answered on 26 Feb 2012, 05:12 AM
Also, the modal problem is fixed. Thank you it was an oversight on my part.
Tags
Window
Asked by
Kim
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Kim
Top achievements
Rank 1
Share this question
or