Infragistics(R) NetAdvantage(R) Windows Forms
AutoFitStyle Enumeration
Example  See Also  E-mail your feedback on this topic.
Infragistics.Win.UltraWinGrid Namespace : AutoFitStyle Enumeration

Enum for specifying UltraGridLayout.AutoFitStyle property.

Syntax

Visual Basic (Declaration) 
Public Enum AutoFitStyle 
   Inherits System.Enum
C# 
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.
None Auto 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.

Visual BasicCopy Code
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
C#Copy Code
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;

}

See Also