Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deleted Records in Grid !!!

Status
Not open for further replies.

ChrisAgius

Programmer
Sep 27, 2000
51
MT
I have a grid and when i delete a record the record is still visible in the grid. Is there a property to set deleted records invisible in the grid. Surely there is because all other forms are ok but this is displaying even deleted records in the grid.

Thanks
 
Are you using a private datasession in this particular form ??

THe SET DELETED ON setting is scoped to the datasession.

HTH,
Weedz (Wietze Veld) They cling emotionally to code and fix development rather than choosing practices based on analytical assesments of what works best. - Steve McConnell
 
In addition to requirement of the SET DELETED ON setitng:
After you delete record, you require to call its method 'Refresh'. Finally, record will be visible until you move to another record. So, after deleting, skip to next/previous record to assure deleted record is no longer visible.

Note also that SET DELETED should be set inthe LOAD method of the form if form have a private data session.
Vlad Grynchyshyn
vgryn@softserve.lviv.ua
The professional level of programmer could be determined by level of stupidity of his/her bugs
 
The problem is that i am inheriting from the same form and so there is the same code but in all forms except this the record is still visible in the grid. Even when i exit and enter the form again the deleted record is still visible even though the frid is refreshed. I think there is some property in the grid which enables deleted records to still remain visible in the grid. Any ideas about some properties of the grid which do so.

Thanks
 
Hi!

As I said, try to put 'SET DELETED ON' in the Load event of the child form, if it have private data session. This setting is unique to the data session only. When this form running, look to the result of the SET('DELETED') function. If it is OFF - there is a reason. Try also to move record after deleting, as I suggested.
Vlad Grynchyshyn
vgryn@softserve.lviv.ua
The professional level of programmer could be determined by level of stupidity of his/her bugs
 
Is the record marked for deletion ? Becuase you said that it still is present when you reopen the form.

When you delete this record, is the grids alias the currently selected alias ??
If not, are you on EOF() in the currently selected alias ??
This could be your problem.

Be sure when you delete the record, the currently selected alias is the one from which you want to delete a record.

HTH,
Weedz (Wietze Veld) They cling emotionally to code and fix development rather than choosing practices based on analytical assesments of what works best. - Steve McConnell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top