Version

Please note that this control has been retired and is now obsolete to the XamDataGrid control, and as such, we recommend migrating to that control. It will not be receiving any new features, bug fixes, or support going forward. 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;