Refresh Grid Column Width Fix on Small Screens - gecko-8/devwiki GitHub Wiki

With Syncfusion grids if you use minWidth and width on your columns to make sure they don't disappear on small screens (enables scrollbar), refreshing the page won't respect the widths until you drag the window bigger or smaller, and then it will update correctly. The fix is to add a dataBound handler to the grid with the following contents:

dataBound: function () { 
    var tgridWidth = this.$refs.grid.ej2Instances.widthService.getTableWidth(this.$refs.grid.getColumns()); 
    this.$refs.grid.ej2Instances.widthService.setMinwidthBycalculation(tgridWidth); 
} 
⚠️ **GitHub.com Fallback** ⚠️