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

error when using radconfirm

1 Answer 61 Views
Window
This is a migrated thread and some comments may be shown as answers.
akeem
Top achievements
Rank 1
akeem asked on 20 Jul 2009, 06:16 PM
When i use the radconfirm box under a certain situation i get this error:

Microsoft JScript runtime error: 'this._windows.length' is null or not an object

var wnd=this.clone(_37,_38); 
this._windows[this._windows.length]=wnd;           //error occurs here 
wnd.set_windowManager(this); 

Here is my set up:

I have a button that when clicked makes visible a div (using the style attribute) which contains a radgrid which is populated. When a row of the grid is right-clicked on and the edit RadMenuItem is selected the information in the page is populated with the row info and the div with the RadGrid hidden again. Now when I click the save button on my page i call a javascript method which uses the radconfirm which causes the above error. I use ajax on the page.


If i just click the save button for when the page is loaded without going to the grid everything works fine. What is the problem here? 

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 21 Jul 2009, 06:52 AM
Hello akeem,

This is a known issue - by design all RadWindowManager functions like radopen, radalert, radconfirm etc. will always use the RadWindowManager that is first rendered on the page. Since you update your control with Ajax, this RadWindowManager is destroyed during the Ajax call and then recreated again, however in such case, radopen, etc. functions will throw an error as they still search for the original one.

What I can suggest in this case is either to upgrade to a recent version of the control, were we improved the behavior of the RadWindowManager in such scenario, or if you don't want to upgrade - to exclude the RadWindowManager from the Ajax update - for example you could put it on the parent page. Note that in such scenario there is no need to ajaxify the RadWindowManager because you are using its client-side API only

All the best,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Window
Asked by
akeem
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or