Categories | Question details Back To List | ||
beta 2.5 - grid doesn't show hello, I'm tryng out the beta version (pro) and I'm having problems loading a grid. xml is correct, it gives no error, headers are loaded fine (from xml) but I just can't see any data. There is another grid in the layout that loads fine, I can see it and it's perfect. On the last (2.1?) version it was working fine. basically I load a tabbar, clicking on the tab it loads a layout, and in cells of the layout I load grids/treegrids. var mygrid = layout.cells(cell).attachGrid(); // mygrid.attachEvent("onEditCell", .... mygrid.imgURL = "/dhtmlxbeta/imgs/"; // mygrid.enableHeaderMenu(); // mygrid.enableContextMenu(menu) mygrid.enableDragAndDrop(true); // LoadSearch(mygrid,table); mygrid.init(); mygrid.setSkin("light"); // mygrid.enableSmartRendering(true,50); mygrid.kidsXmlFile = "/xml/treegrid.exml?table="+table+'&tipo='+tipo+"&coltree="+nt[1]+"&tabtree="+nt[2]; mygrid.loadXML("/xml/treegrid.exml?table="+table+'&tipo='+tipo+"&coltree="+nt[1]+"&tabtree="+nt[2],function(){ // for (var i=1; i<mygrid.getColumnsNum(); i++)mygrid.adjustColumnSize(i); // mygrid.groupBy(2); }); example xml file is: <rows> <head> <column id="node" type="tree" width="150" sort="int">node</column> <column id="label" type="ed" width="100" sort="str">label</column> <column id="note" type="txttxt" width="80" sort="str">note</column> <column id="id_wisi" type="edn" width="50" sort="int">id_wisi</column> </head> <row id="00001" xmlkids="1"> <cell>00001</cell> <cell>Text</cell> <cell></cell> <cell>5</cell> </row> <row id="00003" xmlkids="1"> <cell>00003</cell> <cell>Date</cell> <cell> </row> </rows> I give you also an example of the other grid that is rendered just fine js --- propgridDef = accCb.attachGrid(); // propgridDef.setSkin("light"); propgridDef.attachEvent("onEditCell",doOnCellEditPropDef); propgridDef.attachEvent("onEnter",doOnEnterPropDef); propgridDef.imgURL = "/dhtmlxbeta/imgs/"; propgridDef.setSkin("light"); // mygrid.init(); propgridDef.id = table+'-P' propgridDef.loadXML("/xml/propertiesDef.exml?table=Properties&source="+table); xml --- <?xml version="1.0" ?> <rows> <head> <column id="property" type="edtxt" width="75">property</column> <column id="value" type="edtxt" width="50">value</column> <column id="options" type="edtxt" width="100">options</column> <column id="MVC" type="combo" editable="false" width="35" xmlcontent="1">MVC <option value="M">M</option> <option value="V">V</option> <option value="C">C</option> </column> <column id="note" type="txttxt" width="250">note</column> </head> <row id="0"><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell></row><row id="1"><cell>datatype</cell><cell>text</cell><cell>varchar,number,memo,date,memo</cell><cell>M</cell><cell></cell></row><row id="2"><cell>dhtmlx</cell><cell>txt</cell><cell>gino,pino,caio,sempronio</cell><cell>V</cell><cell></cell></row><row id="3"><cell>format</cell><cell></cell><cell></cell><cell>V</cell><cell></cell></row><row id="4"><cell>height</cell><cell></cell><cell></cell><cell>V</cell><cell></cell></row><row id="5"><cell>length</cell><cell>20</cell><cell></cell><cell>V</cell><cell></cell></row><row id="6"><cell>options</cell><cell></cell><cell></cell><cell>M</cell><cell></cell></row><row id="7"><cell>postfix</cell><cell></cell><cell></cell><cell>V</cell><cell></cell></row><row id="8"><cell>prefix</cell><cell></cell><cell></cell><cell>V</cell><cell></cell></row><row id="9"><cell>regexp</cell><cell></cell><cell></cell><cell>C</cell><cell></cell></row><row id="10"><cell>testaldo</cell><cell>12</cell><cell>1,3,12</cell><cell>M</cell><cell>digi</cell></row><row id="11"><cell>testaldo1</cell><cell>A</cell><cell>A,b,c</cell><cell>M</cell><cell></cell></row><row id="12"><cell>validate function</cell><cell></cell><cell></cell><cell>C</cell><cell></cell></row><row id="13"><cell>value max</cell><cell></cell><cell></cell><cell>V</cell><cell></cell></row><row id="14"><cell>value min</cell><cell></cell><cell></cell><cell>V</cell><cell>dfasdf</cell></row><row id="15"><cell>width</cell><cell></cell><cell></cell><cell>V</cell><cell></cell></row> </rows> I've tried them all ... help please Answer posted by dhxSupport on Aug 27, 2009 01:55 You have issue in the xml file. Please replaced <cell>Date</cell> <cell> with <cell>Date</cell> <cell /> |