error when using radconfirm

2 posts, 0 answers
  1. akeem
    akeem avatar
    14 posts
    Member since:
    May 2009

    Posted 20 Jul 2009 Link to this post

    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 

    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? 
  2. Georgi Tunev
    Georgi Tunev avatar
    7207 posts

    Posted 21 Jul 2009 Link to this post

    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.
Back to Top