Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by krishna on Jun 20, 2007 20:52
open dhtmlx forum
Im able to insert an element successfully into a grid provided that no tree type is specified. If a tree type is specified then im getting an error like this._h2.get[...].state is NULL or not an object . I know im doing something wrong with my XML File which im loading via loadXML method , But im not sure of it. Can you help me out with this issue regards Krishna Prabakar

This the XML file which i'm using to develop the initial grid (ie empty grid where the second column is of tree type. If i change that to "ed" type then the insert row at the beginning function is working fine.

<?xml version="1.0" encoding="UTF-8"?>
<rows>
    <userdata name="gud1">
        userdata value 1
    </userdata>
    <userdata name="gud2">
        userdata value 2
    </userdata>
     <row id="task1" selected="1" call="1" xmlkids="1">
         <cell> </cell>
         <cell> </cell>
         <cell> </cell>
        <cell></cell>
        <cell></cell>
        <cell> </cell>
         <cell> </cell>
         <cell> </cell>
         <cell> </cell>
         <cell> </cell>
         <cell> </cell>
         <cell> </cell>
         <cell> </cell>
         <cell xmlcontent="2" >
            <complete>
                <option value="1" type="ch">one</option>
                <option type="ch" value="2">two</option>
                <option type="ch" value="3">three</option>
                <option type="ch" value="4">four</option>
                <option value="5">five</option>
                <option value="6">six</option>
                <option value="7">seven</option>
                <option value="8">eight</option>
                <option value="9">nine</option>
                <option value="10">ten</option>
            </complete>
        </cell>
         <cell> </cell>
        
    </row>
    <row id="task2" selected="1" call="1" xmlkids="1">
         <cell></cell>
        <userdata name="hondaUD">
            userdata value for honda
        </userdata>
        <cell></cell>
    </row>

    <row id="task3" selected="1" call="1" xmlkids="1">
         <cell></cell>
        <userdata name="hondaUD">
            userdata value for honda
        </userdata>
        <cell></cell>
    </row>
    <row id="task4" selected="1" call="1" xmlkids="1">
         <cell></cell>
        <userdata name="hondaUD">
            userdata value for honda
        </userdata>
        <cell></cell>
    </row>
    <row id="task5" selected="1" call="1" xmlkids="1">
         <cell></cell>
        <userdata name="hondaUD">
            userdata value for honda
        </userdata>
        <cell></cell>
    </row>
    <row id="task6" selected="1" call="1" xmlkids="1">
         <cell></cell>
        <userdata name="hondaUD">
            userdata value for honda
        </userdata>
        <cell></cell>
    </row>
    <row id="task7" selected="1" call="1" xmlkids="1">
         <cell></cell>
        <userdata name="hondaUD">
            userdata value for honda
        </userdata>
        <cell></cell>
    </row>
    <row id="task8" selected="1" call="1" xmlkids="1">
         <cell></cell>
        <userdata name="hondaUD">
            userdata value for honda
        </userdata>
        <cell></cell>
    </row>
    <row id="task9" selected="1" call="1" xmlkids="1">
         <cell></cell>
        <userdata name="hondaUD">
            userdata value for honda
        </userdata>
        <cell></cell>
    </row>
    <row id="task10" selected="1" call="1" xmlkids="1">
         <cell></cell>
        <userdata name="hondaUD">
            userdata value for honda
        </userdata>
        <cell></cell>
    </row>
    <row id="task11" selected="1" call="1" xmlkids="1">
         <cell></cell>
        <userdata name="hondaUD">
            userdata value for honda
        </userdata>
        <cell></cell>
    </row>
    <row id="task12" selected="1" call="1" xmlkids="1">
         <cell></cell>
        <userdata name="hondaUD">
            userdata value for honda
        </userdata>
        <cell></cell>
    </row>
    <row id="task13" selected="1" call="1" xmlkids="1">
         <cell></cell>
        <userdata name="hondaUD">
            userdata value for honda
        </userdata>
        <cell></cell>
    </row>
    <row id="task14" selected="1" call="1" xmlkids="1">
         <cell></cell>
        <userdata name="hondaUD">
            userdata value for honda
        </userdata>
        <cell></cell>
    </row>
    <row id="task15" selected="1" call="1" xmlkids="1">
         <cell></cell>
        <userdata name="hondaUD">
            userdata value for honda
        </userdata>
        <cell></cell>
    </row>
    <row id="task16" selected="1" call="1" xmlkids="1">
         <cell></cell>
        <userdata name="hondaUD">
            userdata value for honda
        </userdata>
        <cell></cell>
    </row>
    <row id="task17" selected="1" call="1" xmlkids="1">
         <cell></cell>
        <userdata name="hondaUD">
            userdata value for honda
        </userdata>
        <cell></cell>
    </row>
    <row id="task18" selected="1" call="1" xmlkids="1">
         <cell></cell>
        <userdata name="hondaUD">
            userdata value for honda
        </userdata>
        <cell></cell>
    </row>
    <row id="task19" selected="1" call="1" xmlkids="1">
         <cell></cell>
        <userdata name="hondaUD">
            userdata value for honda
        </userdata>
        <cell></cell>
    </row>
    <row id="task20" selected="1" call="1" xmlkids="1">
         <cell></cell>
        <userdata name="hondaUD">
            userdata value for honda
        </userdata>
        <cell></cell>
    </row>
    <row id="task21" selected="1" call="1" xmlkids="1">
         <cell></cell>
        <userdata name="hondaUD">
            userdata value for honda
        </userdata>
        <cell></cell>
    </row>
    <row id="task22" selected="1" call="1" xmlkids="1">
         <cell></cell>
        <userdata name="hondaUD">
            userdata value for honda
        </userdata>
        <cell></cell>
    </row>
    <row id="task23" selected="1" call="1" xmlkids="1">
         <cell></cell>
        <userdata name="hondaUD">
            userdata value for honda
        </userdata>
        <cell></cell>
    </row>
    <row id="task24" selected="1" call="1" xmlkids="1">
         <cell></cell>
        <userdata name="hondaUD">
            userdata value for honda
        </userdata>
        <cell></cell>
    </row>
    <row id="task25" selected="1" call="1" xmlkids="1">
         <cell></cell>
        <userdata name="hondaUD">
            userdata value for honda
        </userdata>
        <cell></cell>
    </row>
    <row id="task26" selected="1" call="1" xmlkids="1">
         <cell></cell>
        <userdata name="hondaUD">
            userdata value for honda
        </userdata>
        <cell></cell>
    </row>
    <row id="task27" selected="1" call="1" xmlkids="1">
         <cell></cell>
        <userdata name="hondaUD">
            userdata value for honda
        </userdata>
        <cell></cell>
    </row>
    <row id="task28" selected="1" call="1" xmlkids="1">
         <cell></cell>
        <userdata name="hondaUD">
            userdata value for honda
        </userdata>
        <cell></cell>
    </row>
</rows>


Kindly let me know whether anything is wrong with this file .
Answer posted on Jun 21, 2007 16:31
The problem is not reconstuctable from my side, but I was able to reconstruct similar error in case of incorrect addRow command

In case of treeGrid the add row accepts next parameters

addRow(new_id,text,ind,parent_id)

if you are adding row to top level you still MUST specify parent_id , for top level it will be 0
For example
    mygrid.addRow(new_id,["v1","v2","v3"],null,0);

Answer posted by Stanislav (Support) on Dec 04, 2014 11:06

If you haven't found the needed information there and still looking for a solution, you will find the additional help checking ajax grid control and ext js sencha.