Please enable JavaScript to view this site.

Navigation: Advanced topics > Programming topics > JavaScript API > Examples

How to return control in the inline mode

Scroll Prev Next More

 

You can use the ctrl.getPeer(field) function to return the other field control in the inline mode.

Syntax

ctrl.getPeer(field);

Arguments

field

the name of the other field in the same row when in an inline mode.

Return value

Returns the other field control from the same page in the same row when in an inline mode. Works similar to the Runner.getControl function, but should be used in Field events.

Example

Get the 'price' control in an inline mode and then set its value to 1000.

 

var ctlPrice = ctrl.getPeer('price');
ctlPrice.setValue( 1000 );

See also:

JavaScript API: Control object > getControl()

JavaScript API: Control object > setValue()

Field events

Tri-part events

JavaScript API