Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Clicking on Column Header function
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00946470
Message ID:
00946490
Views:
24
Using BindEvent() to bind your header's click event is a piece of cake. Here's what you need to do. In your grid class's Init:
FOR EACH oColumn IN This.Columns
   FOR EACH oHeader IN oColumn.Controls
      IF UPPER(oHeader.BaseClass) = "HEADER"
         BINDEVENT(oHeader,"Click",This,"HeaderClick")
      ENDIF
   ENDFOR 
ENDFOR 
Then you create a method in your grid class called HeaderClick that runs the code you need. If you need to access any properties of the header that caused the click to be fired from within the HeaderClick method, you use the AEVENTS method:
AEVENTS[aCurEvent,0]
loCalledBy = aCurEvent[1]
loCalledBy then has an object reference to the header that the user clicked.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform