RadFormDecorator Issue with dynamically loaded controls

2 posts, 0 answers
  1. Andrew
    Andrew avatar
    5 posts
    Member since:
    Jul 2012

    Posted 13 Jul 2012 Link to this post

    Hi,

    We are currently experiencing an issue in IE8 and IE9 (although I have not tested it in other browsers), where we have a RadFormDecorator on a master page targeting only buttons.  We have several user controls and pages that include their own ASP.NET AJAX UpdatePanels.  It seems when we add controls, such as adding rows with buttons to a GridView dynamically, an issue arises where upon window.unload event fire, the Core.js library iterates through all the telerik controls it is aware of on the page and attempts to dispose of any associated handlers.  There is an assumption within specifically, window.$telerik._removeHandler that attempts to dereference the _events member of an argument passed in but there is no _events member and so a null argument exception bubbles up to the user before, preventing the page from posting until the user acknowledges the error. 

    I am guessing that the RadFormDecorator is keeping track (via the DOM) of the items it is manipulating and since the buttons are being added dynamically, they are somehow circumventing the registration process that RadFormDecorator is using and so when the window.unload event fires, that information that is assumed to exist is not present.  This is again, just a guess.

    We have attempted several of the suggestions found on this forum and on the web but to no avail, specifically:
    1. changing the rendering mode to IE7 mode
    2. hooking into the client-side api via ASP.NET AJAX pageLoad(sender, args){telerik.decorator.decorate()}
    3. changing out the ASP.NET AJAX UpdatePanel with a RadUpdatePanel
    4. changing the location of the RadFormManager to the end of the MasterPage

    Some of the above solutions don't entirely make sense to us but they were worth trying and ultimately did not solve the problem.  Please advise - your feedback is greatly appreciated.

    Thank You

    Andrew

    EDIT: We are using version 2012.1.411.40
  2. Niko
    Admin
    Niko avatar
    404 posts

    Posted 18 Jul 2012 Link to this post

    Hi Andrew,

    Such an issue is likely to occur if there is a piece of code that tries to clear all the handlers attached to a DOM element, thus removing the form decorator event handlers, which will result in the mentioned JS error. Please, check if there is a place in your code where $clearHandlers is called.
    Otherwise you should provide a sample runnable project that demonstrates the issue at hand in order for me to reproduce it and investigate it in details. For that you should open a support ticket and attach the sample code there.

    All the best,
    Niko
    the Telerik team
    Explore the entire set of ASP.NET AJAX controls we offer here and browse the myriad online demos to learn more about the components and the features they incorporate.
Back to Top