Hallo, I try to build an GenericFrame / Advanced-Data-Grid. The first column is a tree, the next columns are normal grid columns. My problem: the data is shown only in the first tree-column. And after each line two additional empty lines are visible. Here is my link -> lab.genericframe.com/ixobtod/ixobtoddemo1.html The PHP code: <?php ... ?> <generic> <template> <HBox> ... <AdvancedDataGrid id="adg1" cornerRadius="20" width="300" height="300" showRoot="false"> <columns> <AdvancedDataGridColumn dataField="@name" headerText="Project name"/> <AdvancedDataGridColumn dataField="x" headerText="X-Value"/> <AdvancedDataGridColumn dataField="y" headerText="Y-Value"/> </columns> </AdvancedDataGrid> <Binding source="templatedata.adg.item" destination="adg1.dataProvider"/> ... </HBox> </template> <!-- LOAD DATA --> <templatedata> <adg> <item name="EU"> <?php ...load the data into $countries_eu... foreach ($countries_eu as $city){ echo " <item name=\"".$city[0]."\" > "; echo " <x x=\"".$city[1]."\" /> "; echo " <y y=\"".$city[2]."\"/> "; echo " </item> "; } ?> </item> <item name="USA"> <?php foreach ($countries_usa as $city){ echo " <item name=\"".$city[0]."\" > "; echo " <x x=\"".$city[1]."\" /> "; echo " <y y=\"".$city[2]."\"/> "; echo " </item> "; } ?> </item> </adg> </templatedata> <!-- CLEAR SCREEN --> <commands> <removeAll/> </commands> </generic> PHP: Thank you for your replays!
Your problem is your structure of the XML. The AdvancedDataGrid component handels your <x> and <y> tags as leaves. You should use something like this foreach ($countries_usa as $city){ echo " <item name=\"".$city[0]."\" x=\"".$city[1]."\" y=\"".$city[2]."\" > "; echo " </item> "; } without using additional sub elements <x> and <y>. Cheers.
I have not used the AdvancedGrid yet, I use <Tree>, but maybe your problem ist dataField="x". This points to a tag. You can use dataField="@x" to point to a property. Also check the documentation help.genericframe.com