Microsoft JScript runtime error: 'null' is null or not an object

10 posts, 0 answers
  1. Daniel Plomp
    Daniel Plomp avatar
    130 posts
    Member since:
    Feb 2004

    Posted 24 Mar 2010 Link to this post

    Hi all,

    Have a question about multiple RadWindows on one page that I try to open client-side.

    These are my windows defined on my page:
    <telerik:RadWindowManager ID="windowManager" runat="server"
            <Windows> 
                <telerik:RadWindow Skin="Sitefinity" InitialBehaviors="None" VisibleStatusbar="false" 
                    Width="650px" Height="725px" Behaviors="Close" ID="wdKitchenSetup" runat="server" 
                    Modal="true" Overlay="false"
                </telerik:RadWindow> 
                <telerik:RadWindow Skin="Sitefinity" InitialBehaviors="None" Visible="false" Width="400px" 
                    Height="400px" Behaviors="Close" ID="wdWashupSetup" runat="server" Modal="true" Overlay="false"
                </telerik:RadWindow> 
            </Windows> 
        </telerik:RadWindowManager> 

    These are the js functions I use.
    The ShowKitchenSetup is working okay. It shows a popup with the content of the referred url.
    The ShowWashupSetup gives an error. (see thread title)

    function ShowWashupSetup(id) { 
     
                    // Define the ajaxManager 
                    var ajaxPanel = $find("<%= ajaxPanel.ClientID %>"); 
     
                    // Concat the arguments 
                    var arguments = "Washup, " + id; 
     
                    // Execute the ajax request 
                    ajaxPanel.ajaxRequest(arguments); 
     
                    // Define the window manager 
                    var manager = GetRadWindowManager(); 
     
                    // Define the url with parameters 
                    var url = "ConfigWashup.aspx?id=" + id; 
     
                    // Get the window 
                    var wnd = manager.getWindowByName("wdWashupSetup"); 
     
                    // Set the url 
                    wnd.setUrl(url); 
     
                    // Show the window 
                    wnd.show(); 
     
                } 
     
                function ShowKitchenSetup(id) { 
     
                    // Define the ajaxManager 
                    var ajaxPanel = $find("<%= ajaxPanel.ClientID %>"); 
     
                    // Concat the arguments 
                    var arguments = "KitchenSetup, " + id; 
     
                    // Execute the ajax request 
                    ajaxPanel.ajaxRequest(arguments); 
     
                    // Define the window manager 
                    var manager = GetRadWindowManager(); 
     
                    // Define the url with parameters 
                    var url = "ConfigKitchen.aspx?id=" + id; 
     
                    // Get the window 
                    var wnd = manager.getWindowByName("wdKitchenSetup"); 
     
                    // Set the url 
                    wnd.setUrl(url); 
     
                    // Show the window 
                    wnd.show(); 
                } 

    Anyone has an idea why this won't work?

    Thanks,
    Daniel
  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 24 Mar 2010 Link to this post

    Hello Daniel,

    The code looks OK so I assume that the reason for the problem might be in the setup that you are using. Please open a support ticket and send us a small sample project where this issue could be reproduced - we will check it right away and get back to you with a solution.


    Regards,
    Georgi Tunev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Daniel Plomp
    Daniel Plomp avatar
    130 posts
    Member since:
    Feb 2004

    Posted 25 Mar 2010 Link to this post

    Hi Georgi,

    I've created the support ticket, so hope to hear from you!

    Thanks,
    Daniel
  5. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 25 Mar 2010 Link to this post

    Hello Daniel,

    First of all I would like to apologize - I was reviewing the forum posts and I just noticed that I missed the problem in your code.
    The reason for the problem is that in the second RadWindow (the one that throws the error) you have set Visible=false. When Visible is set to false, the control will not be rendered on the page at all and that is why you cannot "find" it in the JavaScript code. Remove that property (its default value is true) and all will work as expected.


    Greetings,
    Georgi Tunev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  6. Daniel Plomp
    Daniel Plomp avatar
    130 posts
    Member since:
    Feb 2004

    Posted 25 Mar 2010 Link to this post

    Hi Georgi,

    How stupid NOT to see that! :)
    Thanks for the reply and solution!

    -Daniel-
  7. Subhash
    Subhash avatar
    3 posts
    Member since:
    Nov 2011

    Posted 04 Nov 2011 Link to this post

    Hi,

    I am using telrik RadGrid when I am doing shorting it will give me Bug like "Microsoft JScript runtime error: 'null' is null or not an object".

    Please shortout this issue.

    Thanks & Regards
    Subhash Sharma
    subhashuppdha@gmail.com

  8. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 04 Nov 2011 Link to this post

    Hi Subhash,

    If this issue is related to the RadWindow please examine the following sticky thread on opening if from the server: http://www.telerik.com/community/forums/aspnet-ajax/window/opening-radwindow-from-the-server.aspx. The important part is the utilization of the Sys.Application.Load event to ensure the controls are loaded before trying to access them. More information on that is available here.

    If this issue comes from the sorting of the grid alone please post your question in the respective forum, as there are more people there that this will relate to.


    Best wishes,
    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
  9. Subhash
    Subhash avatar
    3 posts
    Member since:
    Nov 2011

    Posted 07 Nov 2011 Link to this post

    Hi Marin ,

    Thanks for your reply.
    I am facing the problem when click on telerik:RadGrid Header for the sorting, When first time clicking on the telrik:Radgrid its showing me the error and second time sorting work properly.
    Please give me the suitable answer why I am facing this problem.

    Thanks & Regards
    Subhash Sharma
  10. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 08 Nov 2011 Link to this post

    Hello Subhash,

    Please make sure that you are binding the Grid using Advanced DataBinding. If you are using any advanced feature in grid(like sorting), then a better approach is binding RadGrid using "AdvancedData binding" using NeedDataSource event.

    For more information about this can be available here.
    Advanced Data-binding (using NeedDataSource event).
    Grid / Advanced Data Binding.

    Thanks,
    Shinu.
  11. Subhash
    Subhash avatar
    3 posts
    Member since:
    Nov 2011

    Posted 08 Nov 2011 Link to this post

    Hi Shinu,

    I am using Update panel  and doing table row visiblility  "style="display: none"" and when I am doing the Table Row "style="display: block""  then working fine otherwise its give me exception..

    I have alerady remove the update panel but its give me exception and when I reomve "style="display: none"" .working fine....
    Is any issue to using "style="display: none"" , When using the Telrik:RadGrid.

    Thanks & Regards
    Subhash Sharma
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017