Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid header click event
Message
 
To
31/08/1999 09:00:00
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00259608
Message ID:
00259639
Views:
19
>I have a grid in my form and the grid headers have code in the CLICK() event.
>
>I want the users to be able to click the headers whenever they want, but I also want them to be able to resize a grid column or even move a grid column.
>
>However, when they resize or move a column, the CLICK() event code is also called.
>
>How can I prevent the CLICK() code from firing when the user resizes or moves a grid column?

Cemal has it right, put a flag in the column Resize to check and re-set if necessary in the header click. I would only add that I put the same flag in the Moved event also, for same reason. Something like

in column Resize, Moved:

this.parent.lNosort = .T.

in Header.click:
if this.parent.parent.lNosort 
  this.parent.parent.lNosort = .F.
  return
endif
otherwise go ahead and do your sort.
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Previous
Reply
Map
View

Click here to load this message in the networking platform