DataWindow Control Validation
Levels of Validation
1. Data type correct (failure triggers ItemError event)
2. Pass validation rule (failure triggers ItemError event)
3. Value changed
4. ItemChanged Event
Validation property tab
Triggered by ENTER, TAB, UP ARROW, or DOWN ARROW key or clicks another Datawindow column. An Update( ) or AcceptText( ) function will also cause current input to be validated.
User constructs a Validation Expression and message text. External global functions may be called.
Edit Control data is fetched with GetText( )
Script may read and modify validation rules using GetValidate(“<column name>”) and SetValidate(“<column name>”).
Coding a validation script in the ItemChanged event that displays a message box for invalid values, the ItemError message box also appears. To prevent the user from seeing two error messages, consider handling the message in one place, such as the ItemError event.
To change the message title from “DataWindow Error” to something else, use:
GetApplication( ).dwMessageTitle = “Data Error”
To change the message title for a specific DataWindow, use:
Dw_1.Object.DataWindow.Message.Title = dw_1.name + “ Data Error”
No comments yet.
Leave a comment
-
Archives
- May 2009 (1)
- March 2009 (1)
- January 2009 (2)
- December 2008 (1)
- November 2008 (2)
- September 2008 (1)
- August 2008 (1)
- July 2008 (24)
- June 2008 (22)
- May 2008 (69)
- April 2008 (25)
-
Categories
-
RSS
Entries RSS
Comments RSS