Set the column's Width property to Auto
to make the GridControl automatically recalculate the optimal width for this column based on its visible content:
This example contains the following implicit style that applies the specified setting to all columns:
<Window.Resources>
<Style TargetType="dxg:GridColumn">
<Setter Property="Width" Value="Auto"/>
</Style>
</Window.Resources>
- MainWindow.xaml (VB: MainWindow.xaml)
- ViewModel.cs (VB: ViewModel.vb)