Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Testing for header click in a grid
Message
From
29/07/2003 13:11:52
 
 
To
29/07/2003 12:12:38
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00814471
Message ID:
00814600
Views:
9
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform