>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