From 7ce7a11a30267320b281ae2756ca17459cb29fb5 Mon Sep 17 00:00:00 2001 From: OlgunR Date: Tue, 27 Jan 2026 10:56:29 +0100 Subject: [PATCH] Auto-fit grid columns using BestFitColumns() Replaced manual column width settings for "GUID", "PROFILE_ID", and "EMAIL_SUBJECT" with gridView.BestFitColumns() to automatically adjust all column widths based on their content. This improves maintainability and ensures optimal display of data. --- App/EmailProfiler.Form/frmMain.vb | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/App/EmailProfiler.Form/frmMain.vb b/App/EmailProfiler.Form/frmMain.vb index dedfc41..2a4e23a 100644 --- a/App/EmailProfiler.Form/frmMain.vb +++ b/App/EmailProfiler.Form/frmMain.vb @@ -1068,15 +1068,7 @@ Public Class frmMain Dim gridView = TryCast(Me.GridView5, DevExpress.XtraGrid.Views.Grid.GridView) If gridView IsNot Nothing Then gridView.OptionsView.ColumnAutoWidth = True - If gridView.Columns("GUID") IsNot Nothing Then - gridView.Columns("GUID").Width = 50 - End If - If gridView.Columns("PROFILE_ID") IsNot Nothing Then - gridView.Columns("PROFILE_ID").Width = 50 - End If - If gridView.Columns("EMAIL_SUBJECT") IsNot Nothing Then - gridView.Columns("EMAIL_SUBJECT").Width = 300 - End If + gridView.BestFitColumns() End If Catch ex As Exception