Grid parse

I’m trying to parse grid with this xml structure.

<?xml version="1.0" ?>
<rows> 
    <head>      
    	<column width="10" type="ch" align="left" sort="str">Aktiv</column> 
        <column width="30" type="ro" align="left" color="white" sort="str">Bezeichnung</column>  
        <column width="30" type="ro" align="left" sort="str">Format</column>
        <column width="6" type="ch" align="left" sort="str">A</column>
        <column width="6" type="ch" align="left" sort="str">B</column>        
        <column width="6" type="ch" align="left" sort="str">C></column>
        <column width="12" type="ro" align="left" sort="str"></column>
        <settings> 
            <colwidth>%</colwidth>
        </settings> 
    </head> 
    
	<row id="1"><cell></cell><cell>uid</cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell></row><row id="2"><cell></cell><cell>name</cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell></row><row id="3"><cell></cell><cell>matchcode</cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell></row></rows>

When loading with grid.load() as an external file everything goes fine.
When parsing with grid.parse() only the header is shown, not so the rows.

Can you tell me more?

There is no difference from code view ( both load and parse are using the same code under hood )

From which source data is taken in case of parse command ? If it was embed in the html page, it possible that data was corrupted.
Also, parse is a sync command, so be sure that all other grid initialization code was placed before parse

Source is taken from an external php file.
Data is ok (see above).
All grid init is done before.

As said, header is shown, not the rows.

    ui.tabbar.tabs("a").grid = ui.tabbar.tabs("a").attachGrid();
    ui.tabbar.tabs("a").grid.setIconsPath("ui/icons/");
    ui.tabbar.tabs("a").grid.setImagesPath("../../3rdparty/javascript/dhtmlx/skins/web/imgs/");
    ui.tabbar.tabs("a").grid.init();
    
    var result;
    if(result = window.di.post("ui/dialogs/services/tables/columns/data.php", {
    	service: parent.dialogs("services").ui.cells("a").dataview.selection.id,
    	object: parent.dialogs("tables").ui.cells("a").dataview.selection.name
    })) ui.tabbar.tabs("a").grid.parse(result);

result = window.di.post(

window.di.post - the sync function, that return xml text, same as stored in file during data loading , right ?

Please check the attached sample
07_init_grid.zip (2.12 KB)

Yes thats right.
Your example works fine agains latest dhtmlx version.
Whats going on …

[code]grid = ui.tabbar.tabs(“a”).attachGrid();
grid.setIconsPath(“ui/icons/”);
grid.setImagesPath("…/…/3rdparty/javascript/dhtmlx/skins/web/imgs/");
grid.init();

var result;
if(result = window.di.post("ui/dialogs/services/tables/columns/data.php", {
	service: parent.dialogs("services").ui.cells("a").dataview.selection.id,
	object: parent.dialogs("tables").ui.cells("a").dataview.selection.name
})) {
	grid.parse(result);
}[/code]

This one works fine.
Can you please tell me why its an bad idea to load grid to ui.tabbar.tabs(“a”).grid or is it an bug?

I will try to locate the origin of issue.
Most probably the “grid” var interfere with some internals of the tabbar.

That would be fine.
Could you the please give feedback on this?