officefileapi-devexpress-dot-xtraspreadsheet-dot-spreadsheetcolumnbehavioroptions-7b6e6a5a.md
Gets or sets the document’s capability to adjust the column width to accommodate cell content.
Namespace : DevExpress.XtraSpreadsheet
Assembly : DevExpress.Spreadsheet.v25.2.Core.dll
NuGet Package : DevExpress.Spreadsheet.Core
[DefaultValue(DocumentCapability.Default)]
public virtual DocumentCapability AutoFit { get; set; }
<DefaultValue(DocumentCapability.Default)>
Public Overridable Property AutoFit As DocumentCapability
| Type | Default | Description |
|---|---|---|
| DocumentCapability | Default |
A DocumentCapability enumeration value specifying the document’s capability to perform an operation.
|
Available values:
| Name | Description |
|---|---|
| Default |
The value is determined by the current setting. The default value is automatically set if it is not explicitly specified.
| | Disabled |
The feature is not allowed and the corresponding commands are shown disabled.
| | Enabled |
The feature is available and the corresponding commands are shown enabled.
| | Hidden |
The feature is not available and the corresponding commands are hidden.
|
You can access this nested property as listed below:
| Object Type | Path to AutoFit |
|---|---|
| SpreadsheetBehaviorOptions |
.Column .AutoFit
|
Note that when you disable resizing columns (SpreadsheetColumnBehaviorOptions.Resize), the AutoFit command is also disabled. However the AutoFit option remains unchanged.
See Also
SpreadsheetColumnBehaviorOptions Class