WebColumnBase.VisibleIndex Property
Gets or sets the column’s position among visible columns in a web control.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v20.2.dll
NuGet Package: DevExpress.Web
Declaration
Property Value
Type | Default | Description |
---|---|---|
Int32 | -1 | The column’s position among visible columns. |
Remarks
Use a column’s Visible property to specify the visibility of this column. If you set the Visible property to false
, a web control sets this column’s VisibleIndex property to -1
.
The example below demonstrates how to arrange columns in a GridView control:
<dx:ASPxGridView ID="grid" runat="server" DataSourceID="CustomersDataSource" KeyFieldName="CustomerID" Width="600">
<Columns>
<dx:GridViewDataColumn FieldName="ContactName" VisibleIndex="1"/>
<dx:GridViewDataColumn FieldName="CompanyName" VisibleIndex="0" />
<dx:GridViewDataColumn FieldName="City" VisibleIndex="3"/>
<dx:GridViewDataColumn FieldName="Region" Visible="false" />
<dx:GridViewDataColumn FieldName="Country" VisibleIndex="2"/>
</Columns>
</dx:ASPxGridView>
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the VisibleIndex 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.