jQWidgets Forums
jQuery UI Widgets › Forums › TreeGrid › No Data To Display
This topic contains 1 reply, has 1 voice, and was last updated by DaveSawers 11 years, 1 month ago.
Viewing 2 posts - 1 through 2 (of 2 total)
-
AuthorNo Data To Display Posts
-
I’m just starting and must be making a very simple error because although I get the table with columns displayed, I only get a “No data to display” message inside the table.
My XMl is:
<?xml version="1.0" encoding="UTF-8"?> <dialog> <dataitem> <dataname>Conditions</dataname> <id>1</id> <parentid>0</parentid> </dataitem> <dataitem> <dataname>Temperature</dataname> <id>2</id> <parentid>1</parentid> <value>285.0</value> <unit>C</unit> <editable>true</editable> </dataitem> <dataitem> <dataname>Pressure</dataname> <id>3</id> <parentid>1</parentid> <value>1.524</value> <unit>bar_g</unit> </dataitem> <dataitem> <dataname>Mass Flow</dataname> <id>4</id> <parentid>1</parentid> <value>180.5</value> <unit>tonne/h</unit> </dataitem> <dataitem> <dataname>Std Ideal Liq Vol Flow</dataname> <id>5</id> <parentid>1</parentid> <value>199.2</value> <unit>m3/h</unit> </dataitem> <dataitem> <dataname>Molar Flow</dataname> <id>14</id> <parentid>1</parentid> <value>10.78</value> <unit>kNm3/h</unit> </dataitem> <dataitem> <dataname>Assay</dataname> <id>6</id> <parentid>1</parentid> <value>Synthesized Plant Data</value> </dataitem> <dataitem> <dataname>Type</dataname> <id>7</id> <parentid>1</parentid> <value>Distillate</value> </dataitem> <dataitem> <dataname>Properties</dataname> <id>8</id> <parentid>0</parentid> </dataitem> <dataitem> <dataname>Mass Flow</dataname> <id>9</id> <parentid>8</parentid> <value>184.0</value> <unit>te/h</unit> </dataitem> <dataitem> <dataname>Mass Flow (Dry)</dataname> <id>10</id> <parentid>8</parentid> <value>181.7</value> <unit>te/h</unit> </dataitem> <dataitem> <dataname>Composition</dataname> <id>11</id> <parentid>0</parentid> </dataitem> <dataitem> <dataname>Hydrogen</dataname> <id>12</id> <parentid>11</parentid> <value>0.02</value> <unit>mole%</unit> </dataitem> <dataitem> <dataname>Methane</dataname> <id>13</id> <parentid>11</parentid> <value>0.15</value> <unit>mole%</unit> </dataitem> </dialog>
and my Javascript is:
var source = { dataType: "xml", dataFields: [ { name: 'id', type: 'number' }, { name: 'parentid', type: 'number' }, { name: 'dataname', type: 'string' }, { name: 'value', type: 'string' }, { name: 'unit', type: 'string' }, { name: 'editable', type: 'string' } ], hierarchy: { keyDataField: { name: 'id' }, parentDataField: { name: 'parentid' } }, id: 'id', root: 'dialog', record: 'dataitem', url: "...//Dialog.xml" }; var dataAdapter = new $.jqx.dataAdapter(source); // create Tree Grid $("#wrap").jqxTreeGrid({ width: 396, source: dataAdapter, pageable: true, columnsResize: true, columns: [ { text: 'Name', dataField: 'dataname', minWidth: 100, width: 150 }, { text: 'Value', dataField: 'value', width: 150 }, { text: 'Unit', dataField: 'unit', width: 94 } ] });
DOH. Fixed it. My URL was wrong!
-
AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.