wpf-devexpress-dot-xpf-dot-grid-dot-basecolumn-8d7d2592.md
Gets or sets the column’s position among visible columns. This is a dependency property.
Namespace : DevExpress.Xpf.Grid
Assembly : DevExpress.Xpf.Grid.v25.2.Core.dll
NuGet Package : DevExpress.Wpf.Grid.Core
See GetVisibleIndex(DependencyObject) and SetVisibleIndex(DependencyObject, Int32).
| Type | Description |
|---|---|
| Int32 |
An integer value that specifies the column’s position among visible columns.
|
A column’s visible order doesn’t correspond to its position within the grid’s GridControl.Columns collection. The column’s visual position is specified by its VisibleIndex property. The column, whose VisibleIndex property value is set to 0 is leftmost within a View, etc.
To learn more, see Columns Layout and Width.
The following code snippets (auto-collected from DevExpress Examples) contain references to the VisibleIndex attachedproperty.
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.
wpf-grid-sync-isnodeexpanded-with-view-model/CS/DevExpress.Example04/MainWindow.xaml#L33
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="Name" VisibleIndex="0"/>
<dxg:GridColumn FieldName="Age" VisibleIndex="1"/>
wpf-grid-customize-appearance-of-specific-cells/CS/DXGrid_ConditionalFormatting/Window1.xaml.cs#L27
if (values[0] == null) return Brushes.Transparent;
int columnIndex= (int)(values[0] as GridColumn).VisibleIndex;
int rowIndex = (int)values[1];
wpf-grid-customize-appearance-of-specific-cells/VB/DXGrid_ConditionalFormatting/Window1.xaml.vb#L32
If values(0) Is Nothing Then Return Brushes.Transparent
Dim columnIndex As Integer = CInt(TryCast(values(0), GridColumn).VisibleIndex)
Dim rowIndex As Integer = CInt(values(1))
See Also