Version

Column Resizing

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.

The xamGrid™ control allows your end users to resize their columns by dragging the right hand side column separator to the left or right. Your end users can also resize columns by double clicking on the column separator. Multi-column resizing is also supported.

Column resizing can be configured to behave in one of the following ways:

  • A resize indicator displays where the column will be moved to. If the other columns are star sized, then the indicator may not be 100% accurate.

  • The column is resized as soon as your end user starts dragging the resizing indicator

By default, column resizing is enabled and set to Immediate on the xamGrid control. However, you can override this by setting the ColumnResizingSettings object’s AllowColumResizing property to one of the following ColumnResizingType enumeration values:

  • Indicator – This value enables column resizing and a resize indicator displays where the column will be moved to.

  • Immediate – This value enables column resizing and resizes the column as soon as your end user starts dragging the resizing indicator.

  • Disabled – This value disables column resizing.

The following code demonstrates how to enable column resizing.

In XAML:

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

In Visual Basic:

Imports Infragistics.Controls.Grids
...
Me.MyGrid.ColumnResizingSettings.AllowColumnResizing = ColumnResizingType.Indicator

In C#:

using Infragistics.Controls.Grids;
...
this.MyGrid.ColumnResizingSettings.AllowColumnResizing = ColumnResizingType.Indicator;
Column Resizing