Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Mac on Sep 09, 2008 05:12
open dhtmlx forum
Why is the height of my gird so big???

Hi, can you possibly help me.

I'm making a property website and i'm using your grid to store my locations which are taken from a DB. Can you please view this site in IE7. The url is: http://northwood.itproz.co.uk/index.php?option=com_content&view=article&id=1&Itemid=12.

For some reason the height of the grid is extremely large even though there are no field to fill, do you have any idea why?

Thanks in advanced.
Answer posted by Support on Sep 09, 2008 05:39
You have not specified any initial size for the grid
      <div id="gridbox" ></div>  

If you need to have grid with auto-height and auto-width, you still need to defined some intial dimensions 
      <div id="gridbox" style='height:100px; width:100px; '></div>      
and add next lines to the grid's init.
       mygrid.init(); 
       mygrid.enableAutoHeight(true);
       mygrid.enableAutoWidth(true);
Answer posted by mac on Sep 09, 2008 06:50

Thanks, works like a charm.

 

mygrid.setHeader(" , Location, Postcode");

mygrid.setInitWidths("30,120,70")

mygrid.setColAlign("center,left,left")

 

Is it possible to set percentage widths for the grid.

 

For instances

 

mygrid.setInitWidths("10%,60%,30%")

 

and is there a way that I can make the background completely transparent, so I can see the graphic behind the table?

 

Thanks for you help.

 

Mac

Answer posted by Support on Sep 09, 2008 08:09
>>mygrid.setInitWidths("10%,60%,30%")
mygrid.setInitWidthsP("10,60,30")
beware, that percent based width not compatible with enableAutoWidth mode

>>and is there a way that I can make the background completely transparent
dhtmlxgrid.css need to be updated. 
div.gridbox .objbox {
 background-color:white; //<= this line need to be removed