Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refreshing Grid
Message
From
07/03/2001 07:55:27
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00482618
Message ID:
00482628
Views:
12
>Two questions here: First question I have two grids which are on different page of a pageframe control. When I delete a record on page one I have code that deletes the record which is one the grid on page two. I need that grid to refresh not showing the record I just deleted. Do I call the refresh of the grid on page two or what. Also I have a form that has an error event in it. On that form I have a push button that has an error but the error event of the form isn't called. Perhaps what I need is a good primer on how to step up an error routine. Does anyone know of any good examples.

1) If you delete a record in a table the record stays visible as long as it is the currently selected record.
The ususal thing to do is something like to following
If !eof()
skip 1
Endif
If !bof()
Skip -1
endif

As long as set deleted is on the record will vanish.

2) As far as error trapping goes, the form level error event will only fire if you have no code (or dodefault) in the error event of the control

There are 2 ways of handling errors in VFP
a) Have a global on error routine which will catch anything and everything
b) Have specific error methods in each control to catch specific errors that you can cope with at the object level. if the object cannot cope with the error then pass it up the hierarchy to the form then the global error routine will cover anything that falls out.

Sorry I don't know of any examples of error handling - but I'm sure there must be some floating around somewhere - I remember reading an article in foxtalk about it a couple of years ago.
Will Jones
Previous
Reply
Map
View

Click here to load this message in the networking platform