Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Manoj Kumar on Mar 01, 2009 20:26
open dhtmlx forum
How can we change size of combo in editable cell of grid.

How can we change size of combo in editable cell of grid. In combo I am having only 2 options but its size is not apropriate. It is too long. I want its size as per number of options. I am binding grid with xml so combo options are also in xml.
Answer posted by Alex (support) on Mar 02, 2009 05:43

The combo has autoheight feature.

So, if the dhtmlxcombo_whp.js is included, you can try to do something as follows:

grid.loadXML(grid_xml,function(){

var combo = mygrid.getColumnCombo(column_index);


combo.enableOptionAutoHeight(true)

})

The other approach is to change list height which is defined in the dhtmlxcombo.css:

.dhx_combo_list{
  ....
  height:100px;
... 
}



Answer posted by Manoj on Apr 03, 2009 00:24


I have changed dhtmlxgrid.css.
.dhx_combo_select{
.
.
height:50px;
.
}

But white blank space is coming blow the dropdown list. How can we remove that?

Answer posted by Alex (support) on Apr 03, 2009 04:32

Which column type do you use ?

in case of "combo" you should redefine .dhx_combo_list class.