Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by gegonzal on Oct 11, 2007 19:10
open dhtmlx forum
form integration issue

I am using dhtmlxgrid (I own a 1.4 pro license) form integration approach to save a two columns datagrid. It works fine, but on the server side I am receiving a wierd sequence i.e. gridbox_1192120030640_0 and gridbox_1192120030640_1, instead of gridbox_1_0, gridbox_1_1. The final row gets a gridbox_2_0 and gridbox_2_1 sequence.

This is the script I am using (on an empty grid.xml):
.
.
<script language="JavaScript" type="text/javascript">
    mygrid = new dhtmlXGridObject('gridbox');
    mygrid.setImagePath("imgs/");
    mygrid.setHeader("Desde,Hasta");
    mygrid.setInitWidths("108,108");
    mygrid.setColAlign("center,center");
    mygrid.setColTypes("calendar,calendar");
    mygrid.setColumnColor("white,white");
    mygrid.setColSorting("date,date");
    mygrid.enableMultiselect("true");
    mygrid.clearAll();
    mygrid.init();
    mygrid.loadXML("grid.xml");
</script>
.
.

and the following to add/delete rows:
                <input type="Button" onclick="mygrid.addRow((new Date()).valueOf(),[(new Date()),(new Date())],mygrid.getRowIndex(mygrid.getSelectedId()))" id="addbutton" value="Añadir" class="texto_normal" style="display:inline;">&nbsp;
                <input type="Button" onclick="mygrid.deleteSelectedItem()" id="deletebutton" value="Eliminar" class="texto_normal" style="display:inline;">

the grid.xml is:
<?xml version="1.0" encoding="UTF-8"?>
<rows><row><cell></cell><cell></cell></row></rows>

Could you give me a solution to this issue?

Answer posted by gegonzal on Oct 11, 2007 20:13

I forgot to tell that in the previous example I added just two rows...

Thank you in advance for your comments