Tab

WebColumnBase.VisibleIndex Property

Gets or sets the column’s position among visible columns in a web control.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v21.2.dll

Declaration

[DefaultValue(-1)]
public virtual int VisibleIndex { get; set; }

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>

Visible Index

See Also