Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by lener on Mar 13, 2009 04:54
open dhtmlx forum
DhtmlxGrid in xml with #cspan

Hello, I have a question on the use of xml-structures dhtmlxgrid.

In order to combine two columns in the grid, I use the following code:
// table    
    ...
    mygridgeonim.setHeader(" ,<?php echo __d('addreg','Строения',true); ?>,#cspan,<?php echo __d('addreg','Тип геонима',true); ?>,<?php echo __d('addreg','Наименование геонима',true); ?>");
    mygridgeonim.setInitWidthsP("5,5,5,20,65");
    mygridgeonim.setColAlign("center,center,left,left,left");
    mygridgeonim.setColTypes("ra,img,int,ro,ro");
    mygridgeonim.setColSorting("na,na,int,str,str");
    mygridgeonim.init();    
...

This can be done in determining the structure of a document of xml? (
This may be so?

<rows>
<head>
<column width="5" type="ro" align="left" sort="int">#</column>
<column width="5" type="img" align="left" sort="na"></column>
<column>#cspan</column> <-------------------------- here
<column width="20" type="ro" align="left" sort="str">Type</column>
<column width="65" type="ro" align="left" sort="str">Name</column>
...
<settings>
    <colwidth>%</colwidth>
</settings>
</head>
<row id='1''>
<cell>12</cell>
<cell type="img">img/csh/parentFolder.gif^ok'^javascript:Go()^_self</cell>

...
<cell>London</cell>
</row>
</rows>

Answer posted by dhxSupport on Mar 13, 2009 05:53
Yes, this is correct xml structure. #cpan command in the <colum> tag will merge current column with left column. 
Answer posted by lener on Mar 16, 2009 02:50
Domo arigato! ^_^