I am using autoFitColumn function on a Telerik UI for MVC grid to show the content of all cells as per the below article.
https://docs.telerik.com/aspnet-mvc/knowledge-base/grid-autofit-all-columns-width
This works if the grid's display is not none. However, there are three tabs on the page, each containing a grid. Only the opened grid has correct column widths. Other grids have minimum column widths. This is unless the user manually opens each tab quickly during data load.
I tried using Telerik's TabStrip at first, but the grid always has minimum column widths when using autoFitColumns, even on the first tab. The goal was to put a Grid inside each tab of the TabStrip. Currently, I am using custom built tabs.
My current solution to this problem is to set the "hidden" style of each grid to:
position: absolute;
top: -9999px;
left: -9999px;
Is there a better solution?