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

childNodes is Null or not a object...

6 Answers 107 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 1
Patrick asked on 03 Apr 2009, 01:56 PM
Hey guys,

i have a roblem with the Treeview (but only in IE 7.0, Firefox works perfect).

If i put my mousecursor over the Treeview (and only then) an popup-error occures (without clicking).

It says:
Runtimeerror (...) Error: 'childNodes' is null or not a object.

If i look up in debug-mode it shows this:
(file: http://localhost/[projectname]/ScriptResource.axd)
getChildrenByTagName:function(_c6,_c7){ 
var _c8=new Array(); 
var _c9=_c6.childNodes; <-- THIS IS HIGHLIGHTED 
if($telerik.isIE){ 
_c9=_c6.children; 

Hope this might help you by finding an answer for my problem.

Any ideas? :)

p.s. I´m on (2008, 3, 1314, 35)

kind regards

thank you and have a nice weekend


6 Answers, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 06 Apr 2009, 08:44 AM
Hello Patrick,

I am afraid I could not reproduce the problem. Can you please paste here the relevant code (aspx and code behind).

Sincerely yours,
Veselin Vasilev
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Patrick
Top achievements
Rank 1
answered on 06 Apr 2009, 11:40 AM
Hello,

this is what I do in the codebehindpage:

if (!Page.IsPostBack) 
        { 
            RadTreeNode rootNode = new RadTreeNode("Root"); 
            rootNode.Value = GlobalConstants.ROOTGUID.ToString(); 
            rootNode.ImageUrl = "~/images/icons/folder.png"
            rootNode.Expanded = true
            rootNode.ExpandMode = TreeNodeExpandMode.ServerSideCallBack; 
            Treeview.Nodes.Add(rootNode); 
 
            ExecutePage(new Guid(rootNode.Value)); 
        } 

The *.aspx File looks like this:

                <telerik:RadSplitter ID="RadSplitter1" runat="server" Width="1024px" Height="768px"
                    <telerik:RadPane ID="navigationPane" runat="server" Width="200px" Height="768px"
                        <div id="treeview" style="width: 100%; height: 100%; float: left"
                            <telerik:RadTreeView ID="Treeview" runat="server"  
                                Skin="Web20"
                            </telerik:RadTreeView> 
                        </div> 
                    </telerik:RadPane> 
                    <telerik:RadSplitBar ID="RadSplitbar2" runat="server" CollapseMode="Forward"></telerik:RadSplitBar> 
                    <telerik:RadPane ID="content_pane" runat="server" Scrolling="none"
                        <!-- BUTTONS --> 
                        <telerik:RadSplitter ID="RadSplitter3" runat="server" Orientation="Horizontal" Width="824px" 
                            Height="50px"
                            <telerik:RadPane ID="pan_preview" runat="server" Height="100%"
                                <!-- CONTENT --> 
                                 
                            </telerik:RadPane> 
                        </telerik:RadSplitter> 
                    </telerik:RadPane> 
                </telerik:RadSplitter> 

I´ve deleted all things (methods, click-events, other nodes, etc.) but the error still occurs.

But remember, only in IE 7.0! :)

Thank you.

If you need more input, let me know...


0
Veselin Vasilev
Telerik team
answered on 09 Apr 2009, 08:52 AM
Hello Patrick,

Thank you for the provided code.

What you need to do is to change the ID of the div surrounding RadTreeView. Here is why:

you have a div with id = "treeview" and a RadTreeView with ID="treeview" in it. Since the RadTreeView renders a div with id equal to the id of the control - we have two divs with the same id.

Please change it like so:

<div id="treeviewDiv" style="width: 100%; height: 100%; float: left">  
            <telerik:RadTreeView ID="Treeview" runat="server"   
                Skin="Vista" OnNodeExpand="Treeview_NodeExpand">  
            </telerik:RadTreeView>  
        </div>  

I hope this helps.

Best wishes,
Veselin Vasilev
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Patrick
Top achievements
Rank 1
answered on 09 Apr 2009, 08:58 AM
omg

I tried all except this! :) Seems like there is no case-sensitivity. You live and learn.

Thank you so much. Now my application works in both browser.

Great support.

Have a nice weekend and Happy Easter.

Greetings from Germany

0
Devubha
Top achievements
Rank 1
answered on 06 May 2010, 03:21 PM
hi
below image when i click on zenit , i got java script error 'childNodes is Null or not a object...
I open GM there is two more sub child nodes. when i open child node of GM. i didnt get error.
the GM and Zenit is in same level but Zenit has not any child. when i open zenit i got javascript error. 

0
Yana
Telerik team
answered on 10 May 2010, 03:48 PM
Hi Devubha,

I'm afraid that the provided information is not enough for us to reproduce this issue, please send us sample code which will help us observe the problem. Thanks in advance

Regards,
Yana
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.
Tags
TreeView
Asked by
Patrick
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Patrick
Top achievements
Rank 1
Devubha
Top achievements
Rank 1
Yana
Telerik team
Share this question
or