Change the columns order with xBrowse

Post Reply
User avatar
Marco Turco
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London
Contact:

Change the columns order with xBrowse

Post by Marco Turco »

Hi,
I succesfully replaced the fwh tcbrowse with xbrowse that is more flexible.

I only have the problem to change the order of colums,
for example with an array like:

{"Mark","11-11-2007","3:45"}
{"Luc","4-5-2004","11:37"}

if I want to display the second,third and first element in twbrowse I can do it with

ADD COLUMN TO oBrw DATA ARRAY ELEM 2
ADD COLUMN TO oBrw DATA ARRAY ELEM 3
ADD COLUMN TO oBrw DATA ARRAY ELEM 1

but how can I do the same with xBrowse ?

Thanks in advance.

Best Regards,

Marco Turco
demont frank
Posts: 167
Joined: Thu Mar 22, 2007 11:24 am

Post by demont frank »

See

http://fivetechsoft.com/forums/viewtopi ... ht=xbrowse

This error was reported with corection

No reaction

Frank
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Frank,

Already implemented. We simply missed it. Thanks! :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Marco Turco
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London
Contact:

Post by Marco Turco »

Yes,
but what is the way to display the columns with the order

ELEM 2
ELEM 3
ELEM 1

instead the default
ELEM 1
ELEM 2
ELEM 3

?
Demont.frank
Posts: 5
Joined: Fri Sep 07, 2007 2:47 pm

Post by Demont.frank »

Otto

ELEM 2
ELEM 3
ELEM 1

instead the default
ELEM 1
ELEM 2
ELEM 3

WITH OBJECT oBrw
:Swapcols(:aCols[1],:aCols[2]) ; :Swapcols[:aCols[2],:aCols[3])
END

Or look at oBrw:setarray to see how oBrw:bstrdata is set

oCol := :aCols[1]
oCol:bStrData := GenArrayBlock( { || :aArrayData[ :nArrayAt ] },2, .t. )

oCol := :aCols[2]
oCol:bStrData := GenArrayBlock( { || :aArrayData[ :nArrayAt ] },3, .t. )

oCol := :aCols[3]
oCol:bStrData := GenArrayBlock( { || :aArrayData[ :nArrayAt ] },1, .t. )

GenArrayBlock is STATIC and must be changed or copied
Post Reply