ASPxClientEditBase.SetValue(value) Method

Changes the editor's value.

Declaration

SetValue(value: any): void

Parameters

Name Type Description
value any

An object representing the data to be assigned to the editor's edit value.

Remarks

The SetValue method can be used to assign a new value to an editor on the client side.

Note that the editor's edited value can be represented by different data entities depending upon the editor type. So, for a text editor, the parameter's value represents the text to be assigned to the editor. However, for a check editor, it equals either ASPxCheckBox.ValueChecked or ASPxCheckBox.ValueUnchecked, representing the editor's current state. The value to be assigned to a list box editor is specified by the ListEditItem.Value property that indicates the list item to be selected, etc.

Note

Examples

In this example, clicking the ASPxHyperLink sets the ASPxTextBox value to the hyperlink's text using the client ASPxClientEditBase.SetValue method.

function OnHyperLinkClick(s, e) {
    var sampleText = s.GetText();
    tbText.SetValue(sampleText);
    ...
}
See Also