Tree Selector Control: Conversion from ASPX to HTML and TypeScript
The following tables will help you to convert the ASPX elements that are related to a tree selector control to HTML or TypeScript elements.
PXTreeSelector
The following table shows the correspondence between the PXTreeSelector element and the HTML or TypeScript elements. During the conversion of ASPX pages to HTML and TypeScript, you need to replace these ASPX elements with their analogs in HTML or TypeScript.
ASPX | HTML or TypeScript |
---|---|
PXTreeSelector
|
To display a tree selector control without tabs, use the
qp-tree-selector control, as the following example
shows.
|
AllowEditValue
|
Use the allowEditValue property, which is available through the config attribute of the qp-tree-selector control. |
AppendSelectedValue
|
Use the appendSelectedValue property, which is available through the config attribute of the qp-tree-selector control. |
CommitChanges
|
Use the CommitChanges option of
PXFieldState in TypeScript, as the following code shows. With
this option, the control commits changes to the server each time a user has changed
the value in the box and focus is no longer on the
box.
|
DataField
|
Use the name attribute of the field tag in
HTML, as the following code
shows.
|
InitialExpandLevel
|
Use the openedLayers property in the treeConfig configuration property, which is available through the config attribute of the qp-tree-selector control. |
PopulateOnDemand
|
Use the dynamic property in the treeConfig configuration property, which is available through the config attribute of the qp-tree-selector control. |
ShowRootNode
|
Use the hideRootNode property in the treeConfig configuration property, which is available through the config attribute of the qp-tree-selector control. |
TreeParentId
|
Use the parentIdField property in the treeConfig configuration property, which is available through the config attribute of the qp-tree-selector control. |
PXTreeSelectorWithGrid
The following table shows the correspondence between the PXTreeSelectorWithGrid element and the HTML or TypeScript elements. During the conversion of ASPX pages to HTML and TypeScript, you need to replace these ASPX elements with their analogs in HTML or TypeScript.
ASPX | HTML or TypeScript |
---|---|
PXTreeSelectorWithGrid
|
To display a tree selector control with two tabs, use the
qp-tree-selector control, as the following example
shows.
|
AllowEditValue
|
Use the allowEditValue property, which is available through the config attribute of the qp-tree-selector control. |
AppendSelectedValue
|
Use the appendSelectedValue property, which is available through the config attribute of the qp-tree-selector control. |
CommitChanges
|
Use the CommitChanges option of
PXFieldState in TypeScript, as the following code shows. With
this option, the control commits changes to the server each time a user has changed
the value in the box and focus is no longer on the
box.
|
DataField
|
Use the name attribute of the field tag in
HTML, as the following code
shows.
|
InitialExpandLevel
|
Use the openedLayers property in the treeConfig configuration property, which is available through the config attribute of the qp-tree-selector control. |
PopulateOnDemand
|
Use the dynamic property in the treeConfig configuration property, which is available through the config attribute of the qp-tree-selector control. |
SelectorDataMember
|
Use the view property in the selectorConfig configuration property, which is available through the config attribute of the qp-tree-selector control. |
SelectorDescriptionField
|
Use the description property in the selectorConfig configuration property, which is available through the config attribute of the qp-tree-selector control. |
SelectorKeyField
|
Use the key property in the selectorConfig configuration property, which is available through the config attribute of the qp-tree-selector control. |
SelectorTabTitle
|
Use the selectorTabTitle property, which is available through the config attribute of the qp-tree-selector control. |
ShowRootNode
|
Use the hideRootNode property in the treeConfig configuration property, which is available through the config attribute of the qp-tree-selector control. |
TreeParentId
|
Use the parentIdField property in the treeConfig configuration property, which is available through the config attribute of the qp-tree-selector control. |
PXTreeItemBinding
The following table shows the correspondence between the PXTreeItemBinding element, which is used inside the PXTreeSelector or PXTreeSelectorWithGrid element, and the HTML or TypeScript elements. During the conversion of ASPX pages to HTML and TypeScript, you need to replace these ASPX elements with their analogs in HTML or TypeScript.
ASPX | HTML or TypeScript |
---|---|
PXTreeItemBinding
|
Use treeConfig property, which is available through the config attribute of the qp-tree-selector control. |
DataMember
|
Use the dataMember property in the
treeConfig configuration property, which is available through
the config attribute of the qp-tree-selector
control. See an example in the following
code.
|
DescriptionField
|
Use the descriptionField property in the treeConfig configuration property, which is available through the config attribute of the qp-tree-selector control. |
ImageUrlField
|
Use the iconField property in the treeConfig configuration property, which is available through the config attribute of the qp-tree-selector control. |
TextField
|
Use the textField property in the treeConfig configuration property, which is available through the config attribute of the qp-tree-selector control. |
ToolTipField
|
Use the toolTipField property in the treeConfig configuration property, which is available through the config attribute of the qp-tree-selector control. |
ValueField
|
Use the valueField property in the treeConfig configuration property, which is available through the config attribute of the qp-tree-selector control. |
PXDataSource
The following table shows the correspondence between the PXDataSource element, which is used as a container for the DataTrees and PXTreeDataMember elements, and the HTML or TypeScript elements. During the conversion of ASPX pages to HTML and TypeScript, you need to replace these ASPX elements with their analogs in HTML or TypeScript.
ASPX | HTML or TypeScript |
---|---|
PXDataSource >
KeySeparatorChar
|
Use the keySeparatorChar property in the treeConfig property of the controlConfig or fieldConfig decorators.
|
Obsolete ASPX Controls and Properties
The following table lists the obsolete ASPX elements that are related to a tree selector control. You do not need to replace these ASPX elements with any HTML or TypeScript elements.
ASPX Control | Properties |
---|---|
PXTreeSelector |
|
PXTreeSelectorWithGrid |
|