GridValidationType

Inheritance: java.lang.Object

public final class GridValidationType

Represents data validation type.

Fields

FieldDescription
ANY_VALUEAny value validation type.
BOOLEANTRUE or FALSE
CHECK_BOXDisplay the cell as a checkbox.
CUSTOMCustom validation type.
CUSTOM_EXPRESSIONCustom validation type, using regular expression.
CUSTOM_FUNCTIONCustom javascript function validation.
CUSTOM_SERVER_FUNCTIONCustom server-side function validation.
DATEDate validation type.
DATE_TIMEDateTime (yyyy-MM-dd or yyyy-MM-dd hh:mm:ss).
DECIMALDecimal validation type.
DROP_DOWN_LISTShow dropdown list.
FREE_LISTFree List validation type.
LISTList validation type.
TEXT_LENGTHText length validation type.
TIMETime validation type.
WHOLE_NUMBERWhole number validation type.

Methods

MethodDescription
equals(Object arg0)
getClass()
hashCode()
notify()
notifyAll()
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

ANY_VALUE

public static final int ANY_VALUE

Any value validation type.

BOOLEAN

public static final int BOOLEAN

TRUE or FALSE

CHECK_BOX

public static final int CHECK_BOX

Display the cell as a checkbox. And the value of the cell is True of False.

CUSTOM

public static final int CUSTOM

Custom validation type.

CUSTOM_EXPRESSION

public static final int CUSTOM_EXPRESSION

Custom validation type, using regular expression.

CUSTOM_FUNCTION

public static final int CUSTOM_FUNCTION

Custom javascript function validation.

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.

CUSTOM_SERVER_FUNCTION

public static final int CUSTOM_SERVER_FUNCTION

Custom server-side function validation.

Remarks

Use the CustomServerFunction property to specify the serverside validation . below is the example code: first define class which implement GridCustomServerValidation class myservervali : GridCustomServerValidation …… then add validation var gridValidationCollection = this.GridWeb.ActiveSheet.Validations; GridValidation gv = gridValidationCollection.Add(new GridCellArea(1, 1, 2, 2)); gv.ValidationType = GridValidationType.CustomServerFunction; gv.ServerValidation = new myservervali(); then set ClientValidationFunction to deal with client logic when server validation fails and return message gv.ClientValidationFunction = “ValidationErrorClientFunction”; the client function shall be declared like this: function ValidationErrorClientFunction(cell,msg) please check demo page for a detail reference

DATE

public static final int DATE

Date validation type.

DATE_TIME

public static final int DATE_TIME

DateTime (yyyy-MM-dd or yyyy-MM-dd hh:mm:ss).

DECIMAL

public static final int DECIMAL

Decimal validation type.

public static final int DROP_DOWN_LIST

Show dropdown list.

FREE_LIST

public static final int FREE_LIST

Free List validation type.

LIST

public static final int LIST

List validation type.

TEXT_LENGTH

public static final int TEXT_LENGTH

Text length validation type.

TIME

public static final int TIME

Time validation type.

WHOLE_NUMBER

public static final int WHOLE_NUMBER

Whole number validation type.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

hashCode()

public native int hashCode()

Returns: int

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

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