GridValidation

Inheritance: java.lang.Object

public class GridValidation

Represents data validation.settings.

Fields

FieldDescription
ServerValidationGets or sets the serverside validation javascript function name.

Methods

MethodDescription
addACell(int row, int column)add the validation settings in the cell.
addACell(String cellname)add the validation settings in the cell.
addArea(GridCellArea cellArea)Applies the validation to the area.
equals(Object arg0)
getAreaList()Represents a collection of GridCellArea which contains the data validation settings.
getClass()
getClientValidationFunction()Gets the client validation javascript function name.
getErrorMessage()Represents the data validation error message.
getErrorTitle()Represents the title of the data-validation error dialog box.
getFormula1()Represents the value or expression associated with the data validation.
getFormula2()Represents the value or expression associated with the second part of the data validation.
getInputMessage()Represents the data validation error message.
getInputTitle()Represents the title of the data-validation input dialog box.
getListValue(int row, int column)Get the value for list of the validation for the specified cell.
getOperator()Represents the operator for the data validation.
getRegEx()Gets the regular expression string.
getShowError()Indicates whether the data validation error message will be displayed whenever the user enters invalid data.
getShowInput()Indicates whether the data validation input message will be displayed whenever the user selects a cell in the data validation range.
getValidationType()Gets the validation type.
getValue1()Represents the value associated with the data validation.
getValueList()Gets the value list object.
hashCode()
isRequired()Gets whether the cell value is required.
notify()
notifyAll()
removeACell(int row, int column)Remove the validation settings in the cell.
removeArea(GridCellArea cellArea)Remove the validation settings in the range.
setClientValidationFunction(String value)Sets the client validation javascript function name.
setErrorMessage(String value)Represents the data validation error message.
setErrorTitle(String value)Represents the title of the data-validation error dialog box.
setFormula1(String value)Represents the value or expression associated with the data validation.
setFormula2(String value)Represents the value or expression associated with the second part of the data validation.
setInputMessage(String value)Represents the data validation error message.
setInputTitle(String value)Represents the title of the data-validation input dialog box.
setOperator(int value)Represents the operator for the data validation.
setRegEx(String value)Sets the regular expression string.
setRequired(boolean value)Sets whether the cell value is required.
setShowError(boolean value)Indicates whether the data validation error message will be displayed whenever the user enters invalid data.
setShowInput(boolean value)Indicates whether the data validation input message will be displayed whenever the user selects a cell in the data validation range.
setValidationType(int value)Sets the validation type.
setValueList(ArrayList value)Sets the value list object.
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

ServerValidation

public GridCustomServerValidation ServerValidation

Gets or sets the serverside validation javascript function name.

Remarks

Use the GridCustomServerValidation property to specify the serverside validation .

addACell(int row, int column)

public void addACell(int row, int column)

add the validation settings in the cell.

Parameters:

ParameterTypeDescription
rowintThe row index.
columnintThe column index.

addACell(String cellname)

public void addACell(String cellname)

add the validation settings in the cell.

Parameters:

ParameterTypeDescription
cellnamejava.lang.Stringcell name.

addArea(GridCellArea cellArea)

public void addArea(GridCellArea cellArea)

Applies the validation to the area.

Remarks

In this method , we will remove all old validations on this area.

Parameters:

ParameterTypeDescription
cellAreaGridCellAreaThe area.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

getAreaList()

public ArrayList getAreaList()

Represents a collection of GridCellArea which contains the data validation settings.

Remarks

The old valvidations on the area will not be removed if directly adding are to this list.

Returns: java.util.ArrayList

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getClientValidationFunction()

public String getClientValidationFunction()

Gets the client validation javascript function name.

Remarks

Use the ClientValidationFunction property to specify the client validation function’s name. The function should be declared as this formation: function customValicationFunction(source, value) The parameter “source” is the cell object. The parameter “value” is the string value of a cell to be checked. The function should returns true if the value is valid.

Returns: java.lang.String

getErrorMessage()

public String getErrorMessage()

Represents the data validation error message.

Returns: java.lang.String

getErrorTitle()

public String getErrorTitle()

Represents the title of the data-validation error dialog box.

Returns: java.lang.String

getFormula1()

public String getFormula1()

Represents the value or expression associated with the data validation.

Returns: java.lang.String

getFormula2()

public String getFormula2()

Represents the value or expression associated with the second part of the data validation.

Returns: java.lang.String

getInputMessage()

public String getInputMessage()

Represents the data validation error message.

Returns: java.lang.String

getInputTitle()

public String getInputTitle()

Represents the title of the data-validation input dialog box.

Returns: java.lang.String

getListValue(int row, int column)

public Object getListValue(int row, int column)

Get the value for list of the validation for the specified cell.

Remarks

Only for validation whose type is List and has been applied to given cell, otherwise null will be returned.

Parameters:

ParameterTypeDescription
rowintThe row index.
columnintThe column index.

Returns: java.lang.Object - The value to produce the list of this validation for the specified cell. If the list references to a range, then the returned value will be a ReferredArea object; Otherwise the returned value may be null, object[], or simple object.

getOperator()

public int getOperator()

Represents the operator for the data validation.

See GridOperatorType.

Returns: int

getRegEx()

public String getRegEx()

Gets the regular expression string.

Returns: java.lang.String

getShowError()

public boolean getShowError()

Indicates whether the data validation error message will be displayed whenever the user enters invalid data.

Returns: boolean

getShowInput()

public boolean getShowInput()

Indicates whether the data validation input message will be displayed whenever the user selects a cell in the data validation range.

Returns: boolean

getValidationType()

public int getValidationType()

Gets the validation type.

See GridValidationType.

Returns: int

getValue1()

public Object[] getValue1()

Represents the value associated with the data validation.

Returns: java.lang.Object[]

getValueList()

public ArrayList<String> getValueList()

Gets the value list object.

Returns: java.util.ArrayList<java.lang.String>

hashCode()

public native int hashCode()

Returns: int

isRequired()

public boolean isRequired()

Gets whether the cell value is required.

Returns: boolean

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

removeACell(int row, int column)

public void removeACell(int row, int column)

Remove the validation settings in the cell.

Parameters:

ParameterTypeDescription
rowintThe row index.
columnintThe column index.

removeArea(GridCellArea cellArea)

public void removeArea(GridCellArea cellArea)

Remove the validation settings in the range.

Parameters:

ParameterTypeDescription
cellAreaGridCellAreaThe range which contains the data validation settings.

setClientValidationFunction(String value)

public void setClientValidationFunction(String value)

Sets the client validation javascript function name.

Remarks

Use the ClientValidationFunction property to specify the client validation function’s name. The function should be declared as this formation: function customValicationFunction(source, value) The parameter “source” is the cell object. The parameter “value” is the string value of a cell to be checked. The function should returns true if the value is valid.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setErrorMessage(String value)

public void setErrorMessage(String value)

Represents the data validation error message.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setErrorTitle(String value)

public void setErrorTitle(String value)

Represents the title of the data-validation error dialog box.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setFormula1(String value)

public void setFormula1(String value)

Represents the value or expression associated with the data validation.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setFormula2(String value)

public void setFormula2(String value)

Represents the value or expression associated with the second part of the data validation.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setInputMessage(String value)

public void setInputMessage(String value)

Represents the data validation error message.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setInputTitle(String value)

public void setInputTitle(String value)

Represents the title of the data-validation input dialog box.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setOperator(int value)

public void setOperator(int value)

Represents the operator for the data validation.

See GridOperatorType.

Parameters:

ParameterTypeDescription
valueint

setRegEx(String value)

public void setRegEx(String value)

Sets the regular expression string.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setRequired(boolean value)

public void setRequired(boolean value)

Sets whether the cell value is required.

Parameters:

ParameterTypeDescription
valueboolean

setShowError(boolean value)

public void setShowError(boolean value)

Indicates whether the data validation error message will be displayed whenever the user enters invalid data.

Parameters:

ParameterTypeDescription
valueboolean

setShowInput(boolean value)

public void setShowInput(boolean value)

Indicates whether the data validation input message will be displayed whenever the user selects a cell in the data validation range.

Parameters:

ParameterTypeDescription
valueboolean

setValidationType(int value)

public void setValidationType(int value)

Sets the validation type.

See GridValidationType.

Parameters:

ParameterTypeDescription
valueint

setValueList(ArrayList value)

public void setValueList(ArrayList<String> value)

Sets the value list object.

Parameters:

ParameterTypeDescription
valuejava.util.ArrayList<java.lang.String>

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int