| Visual Basic (Declaration) | |
|---|---|
Public Overloads Sub PerformAutoResize( _ ByVal autoSizeMode As ColumnAutoSizeMode _ ) | |
| C# | |
|---|---|
public void PerformAutoResize( ColumnAutoSizeMode autoSizeMode ) | |
Parameters
- autoSizeMode
- ColumnAutoSizeMode constant which determines whether the text for all items, or only that of items that are currently on-screen, are used when determining the new width for the column.
When 'AllItems' is specified as the value of the autoSizeMode parameter, all members of the associated UltraListView control's UltraListView.Items collection are evaluated when determining the new width for the column. When 'VisibleItems' is specified, only the items that are currently in the viewable area of the control are evaluated.
If this UltraListViewColumnBase instance is the UltraListView.MainColumn, the value of the item's UltraListViewItemBase.Text property is used; if this instance is an UltraListViewSubItemColumn, the value of the corresponding sub-item's Text property is used. The column's UltraListViewColumnBase.Width property is set to a value that is large enough to fully display the graphically widest value in the range.
In the case where the UltraListViewDetailsSettings.AutoFitColumns setting is enabled, and calling the PerformAutoResize method results in a width that cannot be honored because of constraints necessary in order to properly fit all columns, the automatically calculated width is negotiated to a value that allows the remaining columns to be displayed at their minimum width.
Note: Specifying a value of 'AllItems' for the autoSizeMode parameter can have performance ramifications in cases where there the UltraListView.Items collection contains a relatively large number of items.
| Visual Basic | Copy Code |
|---|---|
Imports Infragistics.Win | |
| C# | Copy Code |
|---|---|
using Infragistics.Win; | |
