Forum > Packages and Libraries

TVIrtualDBGrid - Column autowidth

(1/1)

artem101:
Hi.

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); 
(https://i.ibb.co/HqD0MNX/2024-01-22-102940.png)

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

(https://i.ibb.co/jkn7zpb/2024-01-22-103035.png)

Navigation

[0] Message Index

Go to full version