Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trapping changes in Grid cells
Message
From
14/11/2003 10:29:32
 
 
To
12/11/2003 21:40:56
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00846055
Message ID:
00849889
Views:
28
James

alrighty....now for something sorta new.

I'm using the AfterRow event to get the 'old' value of the cell and holding that in a form level variable. I'm using BeforeRow to check to see if the value of the cell has changed and if so, do something. In this case, I change the value from 500 to 450. Thisform.r_oldvalue is 500, and if I browse the file after I've made the change, orditms.apprqty = 450.

If orditms.apprqty <> thisform.r_oldvalue
** calculate new onhand total
endif

It's acting like it's not seeing the change until I move out of the field and then move back into the same field and move out.

wassup with that?

Dorris
>Dorris,
>
>I cannot understand how events that will not fire on one machine will work correctly on another. Are the OSs the same on both machines?
>
>The .ActiveRow property of the grid is, at best, fragile. The grid uses it for its own purposes, not for yours. The best course is to use RECNO( .RecordSource ). This will get you the actual row number.
>
>In my grids I add a .CurrentActiveRow property in the Init() method using .AddProperty() and update it with .CurrentActiveRow = RECNO( .RecordSource ) in the .AfterRowColChange() event. That way I always have a current row number without trying to depend on ActiveRow, which as you have found out, may or may not be accurate.
>
>Regards,
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform