SftBox/OCX 4.5

SftBoxColumns.ColumnIndex Property

Softel vdm, Inc.

Returns the real column number given a display position of a column.

Syntax       

Get

VB.NET

ColNum = object.ColumnIndex(ByVal DispColIndex As Short)  As Short

VB

ColNum = object.ColumnIndex(ByVal DispColIndex As Integer)  As Integer

C#.NET

short ColNum = object.get_ColumnIndex(short DispColIndex);

VC++

short ColNum = object->ColumnIndex[short DispColIndex];
short ColNum = object->GetColumnIndex(short DispColIndex);

C

HRESULT object->get_ColumnIndex(short DispColIndex, short* ColNum);

Delphi

ColNum := object.ColumnIndex[DispColIndex : Smallint]   : Smallint;

object

A SftBoxColumns object.

DispColIndex

Specifies the display position of the requested column.

ColNum

Returns the real column number given a display position of a column.

Comments

The ColumnIndex property returns the real column number given a display position of a column.

As a user reorders columns, this is completely transparent to the application.  An application still references cells and columns by the "real" column number, which is the original column number that the cell or column had before columns were reordered by the user.  While columns appear in a new order after dragging a column to a new position, the application references cells and columns by their real column number which never changes.

If a user reorders columns using column drag & drop, the (display) column numbers, which is the column number as it appears to the user, may need to be translated into the real column number as used by an application.

The Columns.Move method can be used to reorder columns under program control.


Feedback / comments / error reports for this topic
© 2008 - Softel vdm, Inc. - www.softelvdm.com