How to set grid combo excell dropdown properties?

Hello,

I have a grid with a combo excell:

myGrid2.setColTypes("combo");

The libraries being used for the grid and excell are:

<script src='./dhtmlx/dhtmlxGrid/codebase/dhtmlxcommon.js'></script> <script src='./dhtmlx/dhtmlxGrid/codebase/dhtmlxgrid.js'></script> <script src='./dhtmlx/dhtmlxGrid/codebase/dhtmlxgridcell.js'></script> <script src='./dhtmlx/dhtmlxGrid/samples/common/data.js'></script> <script src='./dhtmlx/dhtmlxGrid/codebase/ext/dhtmlxgrid_srnd.js'></script> <script src='./dhtmlx/dhtmlxGrid/codebase/ext/dhtmlxgrid_filter.js'></script> <script src='./dhtmlx/dhtmlxGrid/codebase/ext/dhtmlxgrid_form.js'></script> <script src='./dhtmlx/dhtmlxGrid/codebase/ext/dhtmlxgrid_validation.js'></script> <script src='./dhtmlx/dhtmlxGrid/codebase/excells/dhtmlxgrid_excell_combo.js'></script>

I want the height of the combo’s drop-down to be set automatically:

myGrid2.attachEvent("onEditCell", function(stage,rId,cInd){ if (stage==0 && cInd==0){ var myCombo = myGrid2.getCombo(cInd); myCombo.enableOptionAutoHeight(true); alert("Auto height set"); } return true; });

However, when executing the code, the enableOptionAutoHeight() method doesn’t work, the following alert never appears, and the grid control no longer responds.

Please, would you show me how to correctly set the properties of the excell combo drop-down? Thank you very much.

You need to include the js,css files of the dhtmlxCombo: