Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by carlos garcia on Apr 14, 2009 07:42
open dhtmlx forum
How to use the function mygrid.addRow to generate a row with a parameter "xmlkids" and his value in "1" ?

I need to create a row with a parameter xmlkids="1" as if it was generated
by the XML:

<row id="idrowX" xmlkids="1">
...
...
...
</row>

but the way to create a new row (5 rows) using Javascript is:

mygrid.addRow(new_row_id,['[Type New Strategy Name Here]', '0','','','0'],-1);

In other words my problem is : How to use the function mygrid.addRow to generate
a row with a parameter "xmlkids" and his value in "1" ?
Answer posted by dhxSupport on Apr 14, 2009 08:26

addRow method should looks like that:

mygrid.addRow(new_row_id,['[Type New Strategy Name Here]', '0','','','0'],'','','','xmlkids');

Answer posted by carlos garcia on Apr 14, 2009 08:49
Thaks for your help but when I use

mygrid.addRow(new_row_id,['[Type New Strategy Name Here]', '0','','','0'],'','','','xmlkids');

the new added row don't have the (+) at the side, (and the child rows don't appear)

I need that when a user add a new row, then
mygrid.kidsXmlFile="generate_the_child_xml.cgi";     

send the data like childs of this new row, and the user can use it.

thanks again
Answer posted by dhxSupport on Apr 14, 2009 09:01
Please contact support@dhtmlx.com and provide your ref. ID and we will send you example.