Radwindow null reference bug

2 posts, 0 answers
  1. dexter
    dexter avatar
    31 posts
    Member since:
    Jul 2011

    Posted 03 Oct 2011 Link to this post

    Hi,

    I realize there is this weird bug happening whenever i use radajaxmanager together with radwindow.

    Here is the problem.

    whenever i click on the radgrid row, the following function fires :
    function show(sender, args){
        winIBRouteRF = $find("<%=winIBRouteRF.ClientID%>");        

        winIBRouteRF.show();

     

    }

    This works fine until i introduced RadAjaxManager. I couldn't find the reference to the window anymore.
    It keeps returning null. The solution to this is if i place the above function outisde of the form tag,
    just below </form>. I cannot place this function on the bottom page due to my project requirement.

    Actually, not only radwindow, but sometimes, other objects just cannot be found using $find. I have to use
    onclientload event in order to get the reference. But unfortunately for radwindow, this event doesn't exist.

    I've tried to place the function in Sys.Application.add_load but it doesn't help.

    Any suggestions?

    Thanks.

    PS: I'm not using RadWindowManager, just RadWindow.

    Regards,
    Dexter

     

     

     

  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    4625 posts

    Posted 04 Oct 2011 Link to this post

    Hi Dexter,

    This is a really strange behavior and I am not sure how to reproduce this. In order to be able to help we would need a small sample where we can observe it. I would advise that you make sure you are not trying to reference an object while it is disposed due to the AJAX request - the best way to do so is the Sys.Application.Load event but I am not sure exactly how you have tried to use it. I would also advise that you examine the following online demo that is very similar to your scenario (a RadWindow opened from a RadGrid and it is an ajaxified scenario): http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=window. I also advise against placing a RadWindow in an update panel, ajaxifying a RadWindow should be done as explained in the following help article: http://www.telerik.com/help/aspnet-ajax/radwindow-ajaxifying.html. Please examine these resources and compare them with your scenario. If you are still unable to resolve the situation please post some more details on the setup you have.


    Greetings,
    Marin
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top