Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What's equivalent to a VALID method in Grids?
Message
From
13/04/2000 17:10:25
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00359435
Message ID:
00359519
Views:
9
>Let's assume I'm having a wonderful brain-dead moment here...
>
>I guess I've been spoiled by all the goodies built into Browse windows, but I'm having problems working with Grids.
>
>In browses, we're able to have record- and field-level validations. What's the equivalent in grids under VFP6?
>
>Thanks in advance!
>- Gerry


Gerry,
Sorry to jump in but I could at least read few messages which I disagree. First corrections :
- Not AfterRowColChange but BeforeRowColChange. In AfterRowColChange you already left the row which doesn't resemble valid IMHO.
- A browse valid doesn't only fire when a field value changes. It has force option.

Now my .2 cents. There is no equivalant of most browse clauses in grid. There are replacements to an extend. Honestly I like grids and would love more if it had all capabilities of a browse too :) There are known bugs (unknowns should be), quirks etc but nearly all of them could be lived with. Before I forget to mention, you could still use a browse and manage it like (uhm nearly) a grid (name clause).

Since you're interested with valid :
If rowlevel then BeforeRCC and Grid.Valid are places. Grid.Valid is interesting in that it fires before a column.control's valid (or was - not sure if corrected in SP3) :)
If field level then probably you'd want to use lostfocus of controls (or valid- my preference is lostfocus). Be warned if you have an unvalidated field clicking a control outside grid just bypasses validation (known bug - again not sure if corrected in SP3). To workaround it you keep a property that notifies grid.valid that there are hanginmg validations and it doesn't let you go out.

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