PDA

View Full Version : problems with treepanel



sebas2515
6 Mar 2012, 1:48 PM
Iīm trying to do a dynamic tree, but it doesn't work.

I send an array form php like this:


$nodes[$i] = array('text' => $categoria[$i]['NombreCategoria'], 'id' => $categoria[$i]['IdCategoria'], 'leaf' => $sw, 'cls' => 'folder');

but i get the next error

records[i] is undefined







ns[i].viewRecordId = records[i].internalId;



When i take out the line red in the php code, the error doesnīt apear, but the parameter node isnīt
send to the server. I need some help with this.

arthurakay
9 Mar 2012, 3:05 PM
I would inspect the "records" array in your debugger. Is it what you think it is?

Obviously, the error is telling you that there is no object at index "i" in the "records" array. You may have to post more code in order for anyone to help you fix this.

mankz
10 Mar 2012, 12:29 AM
Could be related to duplicate id values, double check to sure. Ids for your records must be unique.