Gene,

I've knocked up a quick demo which I hope meets your requirements and emailed you the link to the download on google drive.

Frank.

Frank Cazabon

On 09/01/2019 02:52 PM, Gene Wirchenko wrote:
At 05:28 2019-01-08, Frank Cazabon <frank.caza...@gmail.com> wrote:
Gene, back in April last year you were asking if anyone could write code to your specification regarding the grid problems you were having. I don't recall ever seeing your specification, maybe if you posted it someone might be able to do the code for you.

     At that time, I was also having difficulties posting to the list.  I thought I had come up with something, but maybe, it did not make it and I mistakenly deleted it.  Let me specify something simple:

     Consider a cursor or table of:
          thetext c(20)
          evennr n(3)
          weirdnr n(3)

The validations are:
          thetext>""
          evennr%2=0
          weirdnr%3=0
and the row-level validation is:
          asc(thetext)%2=weirdnr%2

     When a control-level validation error occurs, throw an appropriate message box and then set focus to the control with the erroneous value.

     For a row-level validation:

  1) All control-level validations should be done first.  Start with the current control, then do all the others from left to right.  The first that fails gets the message box, and checking stops.

     Then, do the row-level validation.  If it fails, throw an aoppropriate message box and then set focus to the control in the first column from the left of the values that are checked.  (In the example above, thetext is left of weirdnr, so set focus to thetext.)

Part 2:

     The columns can now be rearranged in any order.  Despite this:

     The coontrol-level validations should still set focus to the correct control.

     The column-level validations done at the start of the row-level validation should be done in the order current then left-to-right.  NOTE THAT THIS COULD NOW BE A DIFFERENT ORDER.

     The row-level validation should still set focus to the leftmost involved control.  NOTE THAT THIS MIGHT BE A DIFFERENT CONTROL.  (Example: If weirdnr gets moved to the left of thetext, row-level validation failing should set focus to weirdnr.)


     This is basic functionality that I want/need.  I have been unable to get this to work with VFP's Grid despite my efforts.

[snip]

Sincerely,

Gene Wirchenko


[excessive quoting removed by server]

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/64f74617-dd0a-e973-b20a-f180906ee...@gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to