Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Validating Data In A Grid Problem.
Message
From
05/02/2002 12:53:27
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
05/02/2002 11:32:01
Mike Sue-Ping
Cambridge, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00615529
Message ID:
00615598
Views:
19
>Hi All,
>
>I have a grid on my VFP6.0 form that has several rows of data. One of the columns contains a field from a table that stores a filename (including fullpath). I would like to have the capability to ensure that this field is never left empty when changing to a new row in the grid. I want to have this validation only for a row change. I don't want the validation if the column changed (in the same row). The validation is simply a warning message and a file open dialog to select the file.
>
>I've been experimenting with the grid's BeforeRowColChange() and AfterRowColChange() events and cannot make the validation work correctly. The validation fires at unexpected times.
>
>Does anyone have some suggestions as to how I may accomplish my requirements?
>
>TIA. All responses are greatly appreciated.
>
>Mike
* BRCC
	If mdown()
		lnBottom	= .top+.headerheight+.relativerow * .rowheight
		lnTop		= lnBottom - this.rowheight
		lnMouseRowPos	= mrow(wontop(),3)
		lnMouseColPos	= mcol(wontop(),3)
		llChangingRow	= !(between(lnMouseRowPos,lnTop, lnBottom) ;
			and between(lnMouseColPos,.left,.left+.width))
	Else
		llChangingRow	= inlist(lastkey(),24,5,18,3,145,148)
	Endif
* Be sure control does a this.Value=this.Value
* otherwise you'd get old value for column+row that is changing
if llChangingRow and !myCheck()
 nodefault
endif
Also validation is needed in grid.valid too.
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
Previous
Reply
Map
View

Click here to load this message in the networking platform