Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ReOrder by Column in a Grid
Message
 
À
20/03/1999 07:51:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00199665
Message ID:
00200124
Vues:
11
>Hi Marc,
>
>How do you "call" the method from your header click event? When I define a grid class the column count at -1 so there is no columns to put the code in??
>


Hi John,

this is the code I put in the click method of the header of each column of the instance of the grid.

*-- this.parent.parent.columnSort(this.parent,this.parent.controlsource)

In your case (if you do not configure your grid at all), you would have to use a call from the menu or from a toolbar. The challenge which I have not yet tried is to get to the grid via the activeform property of the _screen. Not saying it is not possible, just advising that as far as I am concerned, _screen.activeform "does not always work as stated in the manual" :).

To this date I have not yet heard of a way to add this kind of code at runtime, so a -1 setting in the columncount is a barrier to use the click method of the header. I might be wrong though.




As a rule I do not use views submitted to grids, but rather use "created cursors" either from inline sql statements (for read only grids) or cursors created via the CREATE CURSOR statement. This is how I work, not saying it a way to follow.

HTH,

Marc



>>Hi John,
>>
>>Have a look at the code I use in a method of my base grid, called by the click event of the header. The RecordSourceDisconnect and Reconnect methods simply make sure that the cursor is not submitted to the grid while you change it "from under its feet".
>>

If things have the tendency to go your way, do not worry. It won't last. Jules Renard.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform