Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
AfterRowColChange -- just row change?
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00066175
Message ID:
00066179
Views:
24
>In the AfterRowColChange of a grid, is there a way of determining if the Row or Column changed? I could do it by tracking RECNO() against a memvar or custom property but I was wondering if there is an easier built in way?

Nope. Most (including me) have subclassed the grid, added a property to store the current RecNo() which is executed in the BeforeRowColChange method. Then in the AfterRowColChange method we compare the RecNo() to the value in the new grid property. On previous threads, most say they do not use ActiveGridRow value to compare against because performance declines as table size [RecCount()] grows.

I have also added a custom method to my grid subclass that is (by default) always called by AfterRowColChange so I have an alternative to placing code when I use the grid. This custom method is called regardless of whether the row changed or not.
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform