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.

clear()

clear the value of the widget

Parameters

None

Returns

None

set_value()

Sets the value of the widget.

Parameters

Returns

None

disable()

disable the widget on the page.

Parameters

None

Returns

None

get_type()

Returns the widget type

Parameters

None

Returns

String

enable()

Enable the widget on the page.

Parameters

None

Returns

None

get_associateRecordButton()

Returns the associate record button associated with the widget.     

This method is only visible if the 'Allow Adding Existing Records' option is enabled on the Sub-Grid widget.

Example-SubGrid Get Associate Record Button Element

tpc.forms[0].TpcSubGrid.get_associateRecordButton();
Parameters

None

Returns

JQuery Object     

get_existingRecordsCombo()

Returns a kendo combobox object associated with the widget.

This method is only visible if the 'Allow Adding Existing Records' option is enabled on the Sub-Grid widget.

Example-SubGrid Fetch Existing Records Combobox

tpc.forms[0].TpcSubGrid.get_existingRecordsCombo();
Parameters

None

hide_existingData()

Hides the existing data panel from the widget.

In order for this method to be visible, the 'Allow Adding Existing Records' option must be enabled on the widget.     

Example-SubGrid Hide Existing Data Panel

tpc.forms[0].TpcSubGrid.hide_existingData();
Parameters

None

Returns

None

show_existingData()

Shows the existing data panel on the widget.

In order for this method to be visible, the 'Allow Adding Existing Records' option must be enabled on the ​widget.

Example-SubGrid Show Existing Data Panel

tpc.forms[0].TpcSubGrid.show_existingData();
Parameters

None

Returns

None

toggle_existingData()

Toggles the appearance of the existing data panel.

In order for this method to be visible, the 'Allow Adding Existing Records' option must be enabled on the widget.

Example-SubGrid Toggle Existing Data Panel

tpc.forms[0].TpcSubGrid.toggle_existingData();
Parameters

None

Returns

None

get_container()

Returns the container element for the widget.

Example-SubGrid Fetch Container Element

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

None

Returns

JQuery Object

get_element()

Returns the element of the widget.

Example-SubGrid Fetch Element

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

None

Returns

JQuery Object

get_grid()

Returns the kendo grid object associated with the widget.     

Example-SubGrid Fetch Grid

tpc.forms[0].TpcSubGrid.get_grid();
Parameters

None

get_kendoWindow()

Returns the kendo window object associated with the widget.

Example-SubGrid Fetch Kendo Window

tpc.forms[0].TpcSubGrid.get_kendoWindow();
Parameters

None

get_model()

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

In the case of the CRM ​Sub-Grid widget, these returned properties and their types are:

  • AddRecordPageUrl: String
  • AllowAddingExistingRecords: Boolean
  • AllowAddingRecords: Boolean
  • AllowDeletingRecords: Boolean
  • AllowEditingRecords: Boolean
  • AllowExportingRecords: Boolean
  • ControlDataId: String
  • CurrentRecordId: String
  • CurrentRecordLogicalName: String
  • EditRecordPageUrl: String
  • ExistingRecordsDisplayAttribute: String
  • ExistingRecordsValueAttribute: String
  • GridSettings: Object
    • AddRecordButtonText: String
    • ExcelExportAllPages: Boolean
    • ExcelExportFileName: String
    • ExcelExportFilterable: Boolean
    • Filterable: Boolean
    • Groupable: Boolean
    • PageSize: Integer
    • Pageable: Boolean
    • PageableAllowRefresh: Boolean
    • PageableButtonCount: Integer
    • PageablePageSizes: String
    • ReorderableColumns: Boolean
    • ResizableColumns: Boolean
    • ServerFiltering: Boolean
    • ServerGrouping: Boolean
    • ServerPaging: Boolean
    • ServerSorting: Boolean
    • ShowColumnMenu: Boolean
    • Sortable: Boolean
    • VirtualScrolling: Boolean
  • RecordsToShow: String
  • SubGridSettings: Object
    • AddExistingRecordsButtonText: String
    • AddExistingRecordsCancelButtonText: String
    • AddExistingRecordsPlaceholderText: String
    • ExpandExistingRecordsOnFocus: Boolean
    • SelectExistingRecordOnTab: Boolean

Example-SubGrid Fetch Model

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

None

Returns

None

get_windowPlaceHolder()

Returns the modal window associated with the widget.

Example-SubGrid Fetch Window Placeholder

tpc.forms[0].TpcSubGrid.get_windowPlaceholder();
Parameters

None

Returns

JQuery Object

hide()

Hides the widget from the form.

Example-Hide SubGrid

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

None

Returns

None

show()

Shows the widget on the form.

Example-Show SubGrid

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

None

Returns

None

toggle()

toggles the visibility of the widget. ​

Example-EXAMPLE-subgrid TOGGLE

tpc.forms[0].Tpc​Subgrid.toggle()
Parameters

None

Returns

None