Forum > Packages and Libraries

TVIrtualDBGrid - Column autowidth



I use TVIrtualDBGrid instead of built-in TDBGrid component. I use this call for autoresize columns to their content:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---DBGrid1.Header.AutoFitColumns(False, smaAllColumns); 

Result is not exacly what I expected. Is it possible to consider column header width so them will be fully visible, not cropped?



[0] Message Index

Go to full version