Back to Devexpress

OptionsColumn.AllowShowHide Property

windowsforms-devexpress-dot-xtragrid-dot-columns-dot-optionscolumn-ba8d1437.md

latest3.6 KB
Original Source

OptionsColumn.AllowShowHide Property

Gets or sets whether the column can be hidden or restored by an end-user.

Namespace : DevExpress.XtraGrid.Columns

Assembly : DevExpress.XtraGrid.v25.2.dll

NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(true)]
[XtraSerializableProperty]
public bool AllowShowHide { get; set; }
vb
<DefaultValue(True)>
<XtraSerializableProperty>
Public Property AllowShowHide As Boolean

Property Value

TypeDefaultDescription
Booleantrue

true if the column can be hidden or restored by an end-user; otherwise, false.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to AllowShowHide
GridColumn

.OptionsColumn .AllowShowHide

|

Remarks

If the AllowShowHide property is set to false , the column, if visible, cannot be hidden by dragging it away from the Column Header Panel. Similarly, if the column is hidden, it cannot be restored by dragging it from the Customization Form onto the column header panel.

See GridOptionsCustomization.AllowQuickHideColumns, to learn how columns can be hidden by end-users.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the AllowShowHide property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

XAF-how-to-add-an-unbound-column-to-gridlisteditor-to-execute-a-custom-action-for-a-record/CS/EFCore/ButtonInListEF/ButtonInListEF.Win/Controllers/SimpleBusinessActionGridListViewController.cs#L64

csharp
buttonColumn.OptionsColumn.AllowMove = false;
buttonColumn.OptionsColumn.AllowShowHide = false;
buttonColumn.OptionsColumn.AllowSize = false;

See Also

AllowQuickHideColumns

OptionsColumn Class

OptionsColumn Members

DevExpress.XtraGrid.Columns Namespace