Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Record level valid in a grid
Message
De
13/07/1998 09:27:24
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Record level valid in a grid
Divers
Thread ID:
00116749
Message ID:
00116749
Vues:
54
Below is BeforeRowColChange of my grid class. It prevents leaving the row if not table validation is satisfied. So far so good. Problem :
-Table is buffered
-Say table valid expression is !empty(company)
-User is on company field
-Selects all and presses Del
-Presses up arrow
-At this point table valid is satisfied with oldval() (also eval(...rulexpression)) so cannot be catched and VFP message kicks in.
Any suggestion to fix this up ?
do case
	case mdown()
		nBottom = this.relativerow * this.rowheight
		nTop = nBottom -  this.rowheight
		nMouseRowPos = mrow(wontop(),3)
		if !between(nMouseRowPos,;
			this.top+this.headerheight+nTop,;
			this.top+this.headerheight+nBottom) ;
			and !empty(dbgetprop(this.recordsource,"Table","RuleExpression")) ;
			and !evaluate(dbgetprop(this.recordsource,"Table","RuleExpression"))
			nodefault
			this.WarnMessage()
		endif
	case inlist(lastkey(),24,5,18,3,145) ;
		and !empty(dbgetprop(this.recordsource,"Table","RuleExpression")) ;
		and !evaluate(dbgetprop(this.recordsource,"Table","RuleExpression"))
		this.WarnMessage()
		nodefault
	case lastkey() = 27 ;
		and !empty(dbgetprop(this.recordsource,"Table","RuleExpression")) ;
		and !evaluate(dbgetprop(this.recordsource,"Table","RuleExpression"))
		=tablerevert(.f.)
endcase
MTIA.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform