Skip to content

ColumnDisplayIndex - cCJGridColumn

Returns the display index of the column, which represents it current display order

Type: Function
Return Data Type: Integer

Syntax

Function ColumnDisplayIndex Returns Integer

Call Example

Get ColumnDisplayIndex to IntegerVariable

Description

ColumnDisplayIndex returns the current display order index number of the column. Because columns can be rearranged, this index value can change. Note that ColumnDisplayIndex also returns values for hidden columns and they are displayed in the order they would appear if they were not hidden (pbVisible).

The piColumnId property can be used to determine a fixed column index and this is the property index value that is used to manage datasource data. The grid's SelectedColumn is based on piColumnId. Because the order of columns can change, it is best to always refer to columns by their object name.

If you need to work with columns in their display order, you may use the ColumnDisplayIndex function or you may also use the grid function ColumnObjectsInDisplayOrder.

ColumnDisplayIndex exposes the COM ComIndex property. When working with the COM level interface, some messages will require that you use this display order index, while other messages will use the creation order index.

Return Value

The column's display index.