Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dedecting grid row change in beforerowcolchange event
Message
De
21/09/1998 13:54:50
 
 
À
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Dedecting grid row change in beforerowcolchange event
Divers
Thread ID:
00139150
Message ID:
00139150
Vues:
67
Is it possible to dedect grid row change in beforerowcolchange event using this code by Cetin:

> For record level validation this is my grid class beforerowcolchange

> *beforerowcolchange
> LPARAMETERS nColIndex
> thisform.LockScreen = this.lInGrid && Related with highlight
> llChangingRow = .f.
> with this
> if mdown()
> lnBottom = .top+.headerheight+ .relativerow * .rowheight
> lnTop = lnBottom - this.rowheight
> lnMouseRowPos = mrow(wontop(),3)
> llChangingRow = !between(lnMouseRowPos,lnTop, lnBottom)
> else
> llChangingRow = inlist(lastkey(),24,5,18,3,145)
> endif
>endwith
>if llChangingRow ;
> and !empty(dbgetprop(this.recordsource,"Table","RuleExpression")) ;
> and !evaluate( dbgetprop(this.recordsource,"Table","RuleExpression"))
> nodefault
> this.WarnMessage()
> else
> * Escape
> if lastkey() = 27 ;
> and !empty(dbgetprop(this.recordsource,"Table","RuleExpression")) ;
> and !evaluate(dbgetprop(this.recordsource,"Table","RuleExpression"))
> =tablerevert(.f.,this.recordsource)
> endif
>endif

How to handle the following case:

1. During row editing, user activates some other window: this is required.
2. After that, it rapidly clicks in some other row in the editing window.

This causes a number of events to occur: other window lostfocus(), deactivate(),
editing window activate() and at last, your grid beforerowcolchange() event

However, your beforerowcolchange event does NOT dedect row change in this
case because mouse button may be already released at this moment !!!

How to avoid this situation?
Andrus
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform