Skip to main content
Tab

GridColumnEditFormSettings.Visible Property

Gets or sets whether the edit cell that corresponds to the current data column is displayed within the Edit Form.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v23.2.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue(DefaultBoolean.Default)]
public DefaultBoolean Visible { get; set; }

Property Value

Type Default Description
DefaultBoolean Default

One of the enumeration values.

Available values:

Name Description Return Value
True

The value is true.

0

False

The value is false.

1

Default

The value is specified by a global option or a higher-level object.

2

Property Paths

You can access this nested property as listed below:

Object Type Path to Visible
GridViewDataColumn
.EditFormSettings .Visible

Remarks

Edit cells are displayed within the Edit Form. Each cell corresponds to a data column and allows its value within the edited row to be changed. If the Visible property is set to false, the edit cell isn’t displayed within the Edit Form. In this instance, end-users are not allowed to change the column’s values.

It’s also possible to display edit cells within the Edit Form that correspond to data columns that are hidden within the ASPxGridView. To do this, set the Visible property to ‘True’.

If the Visible property is set to ‘Default’, the edit cell’s visibility depends on the visibility of the data column to which it corresponds. The data column’s visibility is specified by its Visible property.

The edit cell’s position within the Edit Form is specified by the GridColumnEditFormSettings.VisibleIndex property.

Operation in Batch Edit Mode

In Batch Edit mode the Visible property specifies whether a value of cell that corresponds to the current data column can be modified by an end-user. If the Visible property is set to false, the row’s cell is visible, but cannot be switched to edit mode. When an end-user navigates through cells using the TAB key, the row’s cells are skipped.

The GridColumnEditFormSettings.VisibleIndex property in Batch Edit mode is not in effect.

Example

BatchEdit_ColumnVisible

<dx:ASPxGridView ID="grid" ClientInstanceName="grid" runat="server" DataSourceID="DemoDataSource1" KeyFieldName="ProductID" EnableRowsCache="False" AutoGenerateColumns="False">
     <Columns>
          <dx:GridViewCommandColumn ShowNewButtonInHeader="true" ShowDeleteButton="True" />
          <dx:GridViewDataTextColumn FieldName="ProductName" >
               <EditFormSettings Visible="False"/>
          </dx:GridViewDataTextColumn>
          <dx:GridViewDataComboBoxColumn FieldName="CategoryID" Caption="Category Name">
               <PropertiesComboBox DataSourceID="ComboBoxDataSource" ValueType="System.Int32" ValueField="CategoryID" TextField="CategoryName" />
          </dx:GridViewDataComboBoxColumn>
          <dx:GridViewDataSpinEditColumn FieldName="UnitPrice">
               <PropertiesSpinEdit DisplayFormatString="c" DisplayFormatInEditMode="true" MinValue="0" MaxValue="60000" />
          </dx:GridViewDataSpinEditColumn>
     </Columns>
     <SettingsPager PageSize="5">
     </SettingsPager>
     <SettingsEditing Mode="Batch" >
          <BatchEditSettings EditMode="Row" />
     </SettingsEditing>
</dx:ASPxGridView>

Online Example

View Example: How to hide the EditForm editor and column caption programmatically

The following code snippets (auto-collected from DevExpress Examples) contain references to the Visible 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.

See Also