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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user