DhtmlGrid don't shows up in the Dhtml Tabbar

Hi.

I’m using a dhtmltabbar and I have successfully initialize. In one of my bars I have to initialize dhtmlGrid.

I also have initialize the grid,but it only shows the header rows not the data in the grid. Debugging with the debugger it says that data are loaded from xml successfully and exist in the request but it not shown in the grid. Also I made html element inspection and the data exist but it’s not shown.bellow I’m pasting my code:



here is the code for the tabbars







here is the function for creating tabs



function createTabs(){

    tabbar=new dhtmlXTabBar(“a_tabbar”,“top”);

    tabbar.setImagePath("/admin/js/dhtmlx/dhtmlxTabbar/codebase/imgs/");

    tabbar.enableAutoSize(false,false);

    tabbar.setOffset(“3”);

    tabbar.loadXML(“settings_elements_tabbar_content.xml”);



}



Here is the xml for the tabs





<?xml version="1.0" encoding="utf-8"?>

    

        

            

            Info

            

            

            Content

            

            

            Design

            

            

            D’Props

            

            

            Code

            

        

    



All scripts works correctly and correctly display data. Here is the D’Props Tab content:



<?php

    header(“Content-type: text/xml; charset=utf-8”);

    header(“Pragma: no-cache”);

?>



<![CDATA[

Element properties




Add new item
]]>





here is the function for creatig the grid:(I use hardcoded tabs and hardcoded xml):



mygrid = new dhtmlXGridObject(id);

        mygrid.imgURL = “/admin/js/dhtmlxGrid/codebase/imgs/”;

        mygrid.setHeader(“Name,Value List,Default Value,Type”);

        mygrid.setInitWidths(“173,173,173,170”);

        mygrid.setColAlign(“left,right,left,left”);

        mygrid.setColTypes(“ed,ed,ed,ed”);

        mygrid.setColSorting(“str,str,str,str”);

        mygrid.setSkin(“xp”);

        mygrid.init();

        

        mygrid.loadXML(“settings_elements_tabbar_content_grid.php”);



And here is the xml for the grid



<?php



header(“Content-type:text/xml”);

    header(“Pragma: no-cache”);



print(’<?xml version="1.0" encoding="UTF-8"?>’);

print("\n");



    

print("\n\t<row id=“1”>\n");

     print("\t\tTeaser Lenght>\n");

     print("\t\t<![CDATA[ ]]>\n");

     print("\t\t\n");

     print("\t\tuser defined\n");

     print("\t\n");

    

     print("\n\t<row id=“2”>\n");

     print("\t\tImage\n");

     print("\t\t\n");

     print("\t\t\n");

     print("\t\tuser defined\n");

     print("\t\n");

    

     print("\n\t<row id=“3”>\n");

     print("\t\tImage Size\n");

     print("\t\t\n");

     print("\t\t\n");

     print("\t\tuser defined\n");

     print("\t\n");

    

     print("\n\t<row id=“4”>\n");

     print("\t\tImage position\n");

     print("\t\t\n");

     print("\t\t\n");

     print("\t\tuser defined\n");

     print("\t\n");

    

     print("\n\t<row id=“5”>\n");

     print("\t\tBackground Color\n");

     print("\t\t\n");

     print("\t\t\n");

     print("\t\tuser defined\n");

     print("\t\n");

    

     print("\n\t<row id=“6”>\n");

     print("\t\tContent Article\n");

     print("\t\t\n");

     print("\t\t\n");

     print("\t\tselect\n");

     print("\t\n");



print("\n");



I’ve also test it my xml on www.w3schools.com/Dom/dom_validate.asp and it’s valid(both xml for tabbar and grid)



Can you please help me?I’m trying with this two days and I can figure out where i’m wrong.


Hello,


please check that grid has some height and width. The sample is attached


1252312337.zip (78.4 KB)

Thanks for the response.That was the problem(in height and width).I didn’t set it up.
So now I tried and it works.
I also tried with pixels and it works too,but don’t work if the width and height are set to auto.

Thanks again for great support.