Description
Obtains the validation rule for a column in a DataWindow.
Applies to
DataWindow type |
Method applies to |
---|---|
PowerBuilder |
DataWindow control, DataWindowChild object, DataStore object |
Syntax
PowerBuilder
string dwcontrol.GetValidate ( string column ) string dwcontrol.GetValidate ( integer column )
Argument |
Description |
---|---|
dwcontrol |
A reference to a DataWindow control, DataStore, or child DataWindow. |
column |
The column for which you want the validation rule. Column can be a column number or a column name. The column number is the number of the column as it is listed in the Column Specification view of the DataWindow painter -- not necessarily the number of the column in the Design view. |
Return value
Returns the validation rule for column in dwcontrol. Returns the empty string ("") if no validation criteria are defined for the column.
If any argument value is null, the method returns null.
Usage
You can use GetValidate to save the current validation rule before calling SetValidate to change the rule temporarily.
Examples
These statements change the validation rule for column 7 in the DataWindow control dw_Employee to Rule2:
string Rule1, Rule2 = "Long(GetText()) > 15000" Rule1 = dw_Employee.GetValidate(7) dw_Employee.SetValidate(7, Rule2)
See also