Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Sanju Thomas on Jun 15, 2009 09:55
open dhtmlx forum
removing extra space from the column header

Please check the code given below.

I see at least 5px space on the left of each column, is there any way I can remove that space ?

see column name open, closed and other

<link rel="STYLESHEET" type="text/css" href="js/dhtmlxTreePro/js/grid/dhtmlxgrid.css">


<script src="js/dhtmlxTreePro/js/dhtmlxcommon.js"></script>
<script src="js/dhtmlxTreePro/js/grid/dhtmlxgrid.js"></script>        
<script src="js/dhtmlxTreePro/js/grid/dhtmlxgridcell.js"></script>

<script src="js/dhtmlxTreePro/js/grid/ext/dhtmlxgrid_filter.js"></script>



    
<div id="mygrid_container" style="width:602px;height:300px;"></div>

<body onload="doInitGrid();">


<script>

var mygrid;

function doInitGrid(){

mygrid = new dhtmlXGridObject('mygrid_container');
mygrid.setImagePath("js/dhtmlxTreePro/imgs/");
mygrid.setHeader("Business,Location,High,#cspan,#cspan,Medium,#cspan,#cspan,Low,#cspan,#cspan");
mygrid.attachHeader("#select_filter,#select_filter,Open,Closed,Other,Open,Closed,Other,Open,Closed,Other");
mygrid.setInitWidths("140,120,40,48,48,40,48,48,40,48,48");
mygrid.setColAlign("left,left,left,left,left,left,left,left,left,left,left");
mygrid.setSkin("light");
mygrid.enableColSpan(true);
mygrid.setSkin("light");
mygrid.init();

}


</script>
Answer posted by dhxSupport on Jun 16, 2009 03:40
You can change grid header's padding using following css rule:
div.gridbox table.hdr td {
   padding-left: 0;
}

Please see more information about grid appearance here http://dhtmlx.com/docs/products/dhtmlxGrid/doc/articles/Creating_custom_skin.html#grid_cust_skin