FormatType.format() |
This method returns the formatted value of the data passed as a parameter based on the format type.
It can be used for the controls in a Composite Control that return the formatted data based on the data type.
Syntax
Script |
FormatType.format(sData) |
Parameters
Parameter |
Description |
---|---|
sData |
String. Denotes the data for which the formatted value is returned. |
Return Value
It returns the formatted value.
Example
var dateFormatType; function Form_InitDone(eventObject) { createDateFormatType(); } function createDateFormatType() { dateFormatType = WebForm.getFormatType("date"); dateFormatType.setDisplayFormat("shortdate"); } function xgridColumn1_BeforeBind(eventObject) { eventObject.value = dateFormatType.format(eventObject.value); }