Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Mikkel on Sep 08, 2008 02:47
open dhtmlx forum
combo cells in grid are not initialized when rows are loaded separately from header

Hi,

I am trying to use dhtmlxcombo's in a grid where the grid head is loaded using loadXMLString, and the rows are loaded subsequently using loadXML. The combos, however, are not initialized correctly when the rows are loaded.

The problem can be reproduced by a small change to the pro_combo.html sample:

<script...
mygrid.loadXML("combo2.xml");
...
</script>
<button onclick="mygrid.updateFromXML('combo3.xml')">foo</button>

combo2.xml: (contains grid definition):

<rows>
<head>
        <column width="150" type="combo" align="left" filter="true" sort="str" xmlcontent="1">Filtering Mode<option value="1">one</option>
             <option value="2">two</option>
             <option value="3">three</option>
             <option value="4">four</option>
             <option value="5">five</option>
             <option value="6">six</option>
             <option value="7">seven</option>
             <option value="8">eight</option>
             <option value="9">nine</option>
             <option value="10">ten</option>
</column>
    <column width="150" type="combo" editable="false" source="data.xml" align="left" sort="str">Selectbox Mode
</column>
        <column width="150" type="combo" source="complete.php" auto="true" cache="true" align="left" sort="str" >Autocoplete Mode
        </column>
<settings>
<colwidth>px</colwidth>
</settings>
</head>
</rows>


grid3.xml: (contains grid data)
<rows>
    <row id="1">
        <cell>1</cell>
        <cell>1</cell>
        <cell>Austria</cell>
        
    </row>
    <row id="2">
        <cell>2</cell>
        <cell>2</cell>
        <cell>Bahamas</cell>
    </row>
...
Answer posted by Support on Sep 08, 2008 04:57
Problem fixed in latest version, please use attached js file instead of original one. 
Attachments (1)
Answer posted by couetbis on Oct 06, 2008 05:23
Hi,
I use the same principe but I load head with loadXMLString and it doesn't work.
When I use loadXML, combo data are correctly load, but not with a String.
I must use necessarily loadXML ? With modification, can I resolve problem ?
Answer posted by Support on Oct 06, 2008 07:48
The excell attached to index.php?s=normal&q=4915&a=7196 allows to configurate grid from xml string without any problems. 

Could you, please, provide any sample where the issue can be reconstructed ( you can send it directly to support@dhtmlx.com ) ?