xBrowse - change columns dynamically

xBrowse - change columns dynamically

Postby Otto » Thu Mar 10, 2011 9:02 pm

How can I change change columns dynamically in xBrowse

Thanks in advance
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6330
Joined: Fri Oct 07, 2005 7:07 pm

Re: xBrowse - change columns dynamically

Postby Randal » Sat Mar 12, 2011 6:45 pm

Otto:

Can you elaborate about what you want to do?

Randal
Randal
 
Posts: 260
Joined: Mon Oct 24, 2005 8:04 pm

Re: xBrowse - change columns dynamically

Postby Otto » Sat Mar 12, 2011 8:22 pm

Hello Randal,

I would like to change between these 2 views:

Image

Image
Thanks in advance
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6330
Joined: Fri Oct 07, 2005 7:07 pm

Re: xBrowse - change columns dynamically

Postby James Bott » Sun Mar 13, 2011 2:21 am

Otto,

The simplest thing to do is just define two browses both using the same DBF but opened twice. Then you can hide() one and show() the other. Since you have the DBF open in two workareas you don't have to worry about pointers, filters, sort orders, etc.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: xBrowse - change columns dynamically

Postby Daniel Garcia-Gil » Sun Mar 13, 2011 3:16 am

Otto

Other option is show or hide column
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: xBrowse - change columns dynamically

Postby nageswaragunupudi » Thu Mar 17, 2011 2:33 pm

Mr. Otto

As Mr. Daniel advised Hide and show columns is one simple way if the change is simple.

Another way to dynamically change the view is by using the method ReArrangeCols( aCols, lRetainRest )


To show 'First', 'Last', 'City'
oBrw:ReArrangeCols( { "First", "Last", "City" }, .t. )
To switch to show 'First', 'Age', 'HireDate'
oBrw:ReArrangecols( { "First", "Age", "HireDate" }, .t. )
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10631
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 89 guests