Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Testing for header click in a grid
Message
 
 
À
29/07/2003 13:11:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00814471
Message ID:
00814641
Vues:
9
This message has been marked as the solution to the initial question of the thread.
That would work as well. For me, my header clicks usually perform the same basic functions so I do not need to know which header was clicked. The action taken in the click of by base header class are based on the properties of the column the header is in. This is what the long code I originally posted to you does.

>Mark,
>
>>Let me, please, ask you how to get the name of the column (or header) that when clicked fired the OnHeaderClick method?
>
>I don't know if the solution I found so far is a good one (perhaps there should be a more adequate one if I knew all the intrincacies of grids/columns/headers), but in order to have click event fired (and actions taken) for some (specific) columns, I did:
>
>
> Procedure Header1_Click
>*          ------- -----
>           Messagebox (ThisForm.grdTestGrid.Column1.Header1.Caption + " was Clicked")
> EndProc
>
> Procedure Header2_Click
>*          ------- -----
>           Messagebox (ThisForm.grdTestGrid.Column2.Header1.Caption + " was Clicked")
> EndProc
>
> Procedure grdTestGrid.Init
>*          ----------- ----
>           BindEvent (This.Column1.Header1, "Click", ThisForm, "Header1_Click")
>           BindEvent (This.Column2.Header1, "Click", ThisForm, "Header2_Click")
> EndProc
>
>
>Sounds reasonable?
>
>Regards,
>
>Fernando
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform