Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can I freeze the first 2 column from a grid
Message
 
À
07/09/1999 20:01:49
Coann Teng
Computer Infobase System S/B
Kuala Lumpur, Malaisie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00262229
Message ID:
00263063
Vues:
20
>Can i do this?
>
>
>
>i have a Grid consist of 10 columns.. i would like to freeze the first 2 columns so that when user scoll to the right, user always see the first 2 columns..
>
>
>
>or is there any better idea to do this??
>
>
>
>thank in advance

The April 1997 issue of FoxPro Advisor has an article on how to do this, "Lock Columns in a Split Grid" by Dan LeClair.

It is not too dificult to implement. The grid already has a Partion property to split the grid. You just need to add code to keep the columns in the right places.

Add a new property to specify the anchor column for the right grid panel. In your case you would set it to 3.

In the grid's Init: Adjust the Partition property to make it large enough to display your locked columns. Select the right panel and use the DoScroll method to make the 3rd column the leftmost column in the panel.

Now you have the initial display set up you just need to make sure it stays the way you want it. In the AfterRowColumnChange, Refresh and Scrolled events check to make sure the the left column in your left panel is column 1. If not use the DoScroll method to adjust. Check the right panel to make sure it is not showing the locked columns. If it is, scroll until the display is correct.
Steve Ruhl
CitiMortgage, Inc.
steven.ruhl@citibank.com Office
Steve@steven-ruhl.com Home
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform