row height


Hello support,



I have split and multiline mode true in grid.

You have given the following method to set the correct row height, when one delete the multiline data from the cell.





mygrid.attachEvent(“onEditCell”,function(stage,id,ind){

                if (stage==“2”){

                    this._fake.rowsAr[id].style.height=this.rowsAr[id].style.height=“1px”;

                    var height=0;

                    for (var i=2; i<this.getColumnsNum(); i++){

                        height=Math.max(height, this.cells(id,i).cell.scrollHeight);

                    }

                    this._fake.rowsAr[id].style.height=this.rowsAr[id].style.height=height+“px”;

                }

                return true;

            })        





Now the problem is when I merge n cells of first column, the first row gets height of n rows.



How to resolve?

Instead of described code, in dhtmlxgrid 1.6 it can be done by using

mygrid.attachEvent(“onEditCell”,function(stage,id,ind){

                if (stage==“2”)
                    grid._correctRowHeight(id);
                return true;
});

There is no safe way to sync. sizes in you have multiline mode and in same time one part of row included in rowspan.