Version

We recommend that you use the xamDataGrid control instead of the xamGrid control. The xamGrid is being planned for retirement over the next few years and will not receive any new features. We will continue to provide support and critical bug fixes for the xamGrid during this time. For help or questions on migrating your codebase to the xamDataGrid, please contact support.

Auto Size Columns Using Mouse Clicks

There are two ways in which your end users can resize columns. They can drag the edge of a column to the desired size or they can double click on the right-hand edge of a column’s header to resize it which sets the column’s width to the longest value currently visible.

To allow your end users to resize columns using a double click, you must set the ColumnResizingSettings object’s AllowDoubleClickToResize property to True.

In XAML:

<ig:XamGrid x:Name="MyGrid">
    <ig:XamGrid.ColumnResizingSettings>
        <ig:ColumnResizingSettings AllowColumnResizing="Indicator"
                                   AllowDoubleClickToSize="True"/>
    </ig:XamGrid.ColumnResizingSettings>
</ig:XamGrid>

In Visual Basic:

Me.MyGrid.ColumnResizingSettings.AllowDoubleClickToSize = True

In C#:

this.MyGrid.ColumnResizingSettings.AllowDoubleClickToSize = true;