Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid valid
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00127636
Message ID:
00127976
Views:
24
>>>I have a grid with several columns that are enabled = .f. I have one column that can be edited. The previous coulumn holds the last value for the meter. I need to be sure that the new value is larger.
>>>
>>>So I need to verify that column 4 current row data is less than column 5 current row data before the user leaves that row with the enter key.
>>>
>>>Can anyone help me with the syntax?
>>>
>>>Thanks
>>
>>Take a look on AfterRowColChange event of the Grid or Current control Valid event.
>>
>>Something like:
>>
>>
>>WITH This
>> IF .ActiveColumn = 4
>> IF .Column4.Text1.Value < .Column5.Text1.Value
>> DO whatever...
>> ENDIF
>> ENDIF
>>ENDWITH
>>
>>OR
>>
>>if you are working on the current column, at Text control Valid event issue:
>>
>>IF This.Value > Thisform.Column1.Text1.Value
>> DO whatever...
>>ENDIF
>>
>>
>
>If the grid is bound to a table or view, you can directly reference the fields in the table for the validation since the table will already be in synch with the grid.
>
>
>if alias.field2 < alias.field1
> ** invalid, please re-enter
>endif
>

Definitely yes, but mine is just for something more on general situation, bounded or not.
JESS S. BANAGA
Project Leader - SDD division
...shifting from VFP to C#.Net

CHARISMA simply means: "Be more concerned about making others feel good about themselves than you are in making them feel good about you."
Previous
Reply
Map
View

Click here to load this message in the networking platform