Version

AutoFitStyle Enumeration

Enum for specifying UltraGridLayout.AutoFitStyle property.
Syntax
'Declaration
 
Public Enum AutoFitStyle 
   Inherits System.Enum
public enum AutoFitStyle : System.Enum 
Members
MemberDescription
ExtendLastColumnExtends the last column to occupy extra visible space. This setting does not have any effect in card-view functionality or in horizontal view style. When one or more of those features is enabled this setting behaves the same as None setting.
NoneAuto resizing is disabled. This is the default value of the property.
ResizeAllColumnsResizes all the columns to fit them in the available visible area. This value corresponds to the how the functionality previously worked before the deprecation of UltraGridLayout.AutoFit property.
Example
Following code sets AutoFitStyle to ResizeAllColumns to make the UltraWinGrid resize all the columns so all of them fit in the available width, thus eliminating the need for a horizontal scroll bar. It affects all the bands.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid

  Private Sub Button19_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button19.Click

      Me.UltraGrid1.DisplayLayout.AutoFitStyle = AutoFitStyle.ResizeAllColumns

  End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;

private void button19_Click(object sender, System.EventArgs e)
{

	this.UltraGrid1.DisplayLayout.AutoFitStyle = AutoFitStyle.ResizeAllColumns;

}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also