How to move a column by source code

Requirement: bBrowser 1.4

 

To move an opened column, at first the column must be closed with the method bBrowser:CloseColumn(). Afterwards with the method bBrowser:OpenColumn() the column must be opened again.

The following code fragment moves the column #LASTNAME at the position 1:

LOCAL oColumn   AS bDataColumn

 

oColumn := oBrowser:CloseColumn(#LASTNAME, True)

IF !Empty(oColumn)

  oBrowser:OpenColumn(oColumn, 1)

ENDIF