Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Miguel on Apr 18, 2008 11:07
open dhtmlx forum
TreeGrid addRow error on ed[=sum] cells

Hello,

I'm having some trouble when adding a row in a TreeGrid as a child to another row. In my code I am setting up a grid with the following ColTypes and ColSorting:

mygrid3.setColTypes("tree,ed,ed[=sum],ed[=sum]");
mygrid3.setColSorting("str,str,int,int");

and my grid looks similar to this (i'm using periods for spacing purposes):

....Vehicles........|...Dealer....|...In Stock..|....Sold
-----------------------------------------------------------------
- Cars..................(blank)..........20............5
|
|--..- BMW............(blank)..........15............3
|....|
|....|..- X Series.....(blank)..........10............2
|....|.....|
|....|.....|-------------David............6.............2
|....|.....|
|....|.....|-------------Josh.............4.............0
|....|
|....|..+ M Series....(blank)..........5.............1
|
|--..+ Audi...........(blank)...........5.............2
|
etc.

Note: (blank) signifies the cell does not contain any information.


My problem comes when I try to add a new child row to the grid. For example, in the above grid, if I wanted to add a new child row underneath the X series, I am using the following method:

mygrid3.addRow((new Date()).valueOf(),[' ', 'Mike' ,1,3], 0, XSeriesID);

This method currently inserts a new row under the X Series node with the correct information, but the In Stock and Sold values for the X Series row change to "#SCL", and the In Stock and Sold values for BMW and Cars change to "NaN". From that point on, I'm no longer able to edit cells, and Javascript errors are thrown when I doubleclick on the cells.

Is there any way that I can prevent the ed[=sum] columns from breaking?

Thanks in advance for the help,
Miguel

Answer posted by Support on Apr 21, 2008 02:58
Problem confirmed and fixed, please contact us directly at support@dhtmlx.com and provide your ref. number - we will send you updated js file.
Answer posted by Miguel on Apr 21, 2008 07:18
What ref. number are you referring to?
Answer posted by Support on Apr 21, 2008 08:34
The license number you received right after purchasing the license (it was sent within the email with download link to the purchased product).