RECOMMENDATION: If you are using a version of The Portal Connector higher than 4.0, we strongly recommend utilizing the MVC based widgets and components to create your site. This documentation is for legacy purposes only and will soon be deprecated.

enable()

Enables the widget on the form.

Example-Enable Picklist

tpc.forms[0].TpcPicklist.enable();
Parameters

None

Returns

None

get_type()

Returns the widget type.

Example-Picklist Fetch Type

tpc.forms[0].TpcPicklist.get_type();
Parameters

None

Returns

None

get_kendoInput()

Returns the Kendo DropDownList Object associated with the widget.

Example-Picklist Fetch Kendo Input

tpc.forms[0].TpcPicklist.get_kendoInput();
Parameters

None

Returns

Kendo Object: Kendo.ui.DropDownList Object

required()

Enables or disables client side validation.

Example-Picklist Required

tpc.forms[0].TpcPicklist.required();
Parameters

Boolean

Returns

None

get_displayInput()

Returns the picklist display associated with the widget.

Example-Picklist Fetch Display

tpc.forms[0].TpcPicklist.get_displayInput();
Parameters

None

Returns

jQuery Object

get_element()

Returns the element of the widget.

Example-Picklist Fetch Element

tpc.forms[0].TpcPicklist.get_element();
Parameters

None

Returns

jQuery Object

clear()

Clears the value of the widget.

Example-Clear Picklist

tpc.forms[0].TpcPicklist.clear();
Parameters

None

Returns

None

disable()

Disables the widget on the form.

Example-Disable Picklist

tpc.forms[0].TpcPicklist.disable();
Parameters

None

Returns

None

get_model()

Returns the model object of the widget, which contains a number of useful properties related to the widget.

Example-Picklist Fetch Model

tpc.forms[0].TpcPicklist.get_model();
Parameters

None

Returns

Object

get_input()

Returns the input element associated with the widget.     

Example-Picklist Fetch Input Element

tpc.forms[0].TpcPicklist.get_input();
Parameters

None

Returns

jQuery Object

get_container()

Returns the container element associated with the widget.

Example-Picklist Fetch Container Element

tpc.forms[0].TpcPicklist.get_container();
Parameters

None     

Returns

jQuery Object

hide()

Hides the widget from the form.

Example-Hide Picklist

tpc.forms[0].TpcPicklist.hide();
Parameters

None

Returns

None

show()

Shows the widget on the form.

Example-Show Picklist

tpc.forms[0].TpcPicklist.show();
Parameters

None

Returns

None

set_value()

Sets the value of the widget.

Example-Picklist Set Value

tpc.forms[0].TpcPicklist.set_value(2); tpc.forms[0].TpcPicklist.set_value("4");
Parameters

String

Returns

None

get_value()

Returns the currently selected value of the widget.

Example-Picklist Fetch Value

tpc.forms[0].TpcPicklist.get_value();
Parameters

None

Returns

String

get_textValue()

Returns the text label of the currently selected item on the widget.

Example-Picklist Fetch Text Value

tpc.forms[0].tpcPicklist.get_textValue();
Parameters

None

Returns

String

set_textValue()

Sets the value of the widget according to a text label.

Example-Picklist Set Text Value

tpc.forms[0].TpcPicklist.set_textValue("UPS");
Parameters

String

Returns

None

add_valueChanged()

Fired when the value of the widget is changed by the user.
The event handler function context (available via the this keyword) will be set to the widget instance.

Example-Binding a function to the add_valueChanged() event.

//For example, using: var a = tpc.forms[0].TpcPicklist.add_valueChanged(function() { console.log( this.get_value()); }); //will output the selected value of the widget to the console as soon as the value changes. All delegates must be set with a variable.
Parameters

Function

Returns

None     

remove_valueChanged()

Removes any delegate hooked up to the add_valueChanged() event.

Example-Picklist Remove Value Changed Binding

//For example, using: var a = tpc.forms[0].TpcPicklist.add_valueChanged(function() { console.log( this.get_value()); }); //will output the selected value of the widget to the console as soon as the value changes. All delegates must be set with a variable. This way you can easily remove this delegate from any widget by using: tpc.forms[0].TpcPicklist.remove_valueChanged(a);
Parameters

Function

Returns

None

toggle()

Toggles the visibility of the widget.

Example-Picklist TOGGLE

tpc.forms[0].TpcPicklist.toggle()
Parameters

None

Returns

None

readonly()

Sets the widget state to read only.

Example-PICKLIST READONLY

//set to true
tpc.forms[0].TpcPicklist.readonly(true);

//set to false
tpc.forms[0].TpcPicklist.readonly(false);

//show the read only status
tpc.forms[0].TpcPicklist.readonly();
Parameters

true, false

Returns

None