GetValidate
method (DataWindows)
Description
Obtains the validation rule for a column in a DataWindow.
Applies to
|
DataWindow type |
Method applies to |
|---|---|
|
PowerBuilder |
DataWindow control, DataWindowChild object, DataStore |
Syntax
PowerBuilder
|
1 2 |
string dwcontrol.GetValidate ( string column ) string dwcontrol.GetValidate ( integer column ) |
|
Argument |
Description |
|---|---|
|
dwcontrol |
A reference to a DataWindow control, DataStore, or |
|
column |
The column for which you want the validation rule. |
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, in PowerBuilder and JavaScript 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:
|
1 2 3 |
string Rule1, Rule2 = "Long(GetText()) > 15000" Rule1 = dw_Employee.GetValidate(7) dw_Employee.SetValidate(7, Rule2) |
See also