Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Deleted Method in the grid control
Message
De
18/07/1997 11:49:09
Edward Crawford
City Facilities Management
Glasgow, Royaume Uni
 
 
À
18/07/1997 08:50:57
Sonny Chouinard
CHCA Computer Systems Inc.
Lachenaie, Québec, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00040480
Message ID:
00040585
Vues:
30
>>I have noticed that if you click on the delete marker in a grid without first clicking on a row, the parameter that is passed to the deleted method is the record number of the row that you are leaving, not the row that you are trying to flag for deletion. If you click on the row first, before the delete marker, then the correct record number gets passed.
>>
>>I am writing a browser that logs any changes that the users makes to a table. To capture a deletion, I have attached the processing code to the deleted method of the grid control. This information is then logged to a file. If the user clickes on the row first, clicks on the delete marker, it works fine. If, however, they go directly to the delete marker, the data that is recorded is from the last row that was clicked on. Any ideas?
>>
>>
>> Ed
>
>Hi
>
> I did have this problem last year. The reason is that the row as not the focus before the deleted event is called. That's why the record is not changing position. So, you can try to go to the row before you delete it (DELETED EVENT) or you create a row that will do the same as the deleted mark but you write the code yourself.
> I did choose the last option. It works great now.
>
> Hope this help.


Hi Sonny:

I thought of this also. Add a column and place a check object in the column. The problem is I have the grid.ColumnCount property set to -1 so as I switch between tables, the grid dynamically handles the fields. When you try to add a column to this, it adds the column and changes the column count to 1, thus displaying only one column. I also thought of forcing focus on that row, but I can't think of a way to do that since grid.ActiveRow is still on the old row.

Ed
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform