Selector Control: Conversion from ASPX to HTML and TypeScript
The following tables will help you to convert the ASPX elements that are related to the selector control to HTML or TypeScript elements.
PXSelector
The following table shows the correspondence between PXSelector and 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 |
---|---|
PXSelector
|
Use the field tag, as shown in the following code. The
control represents the selector control if the PXSelector
attribute is specified (or its descendants are specified) for the DAC field in the
name attribute.
In rare cases, you can use the qp-selector tag. |
AllowAddNew
|
Use the config-allow-edit property in HTML, as
shown in the following code. The property enables the link and add the
+ (Add Row) button to the lookup
table of the selector control.
|
AllowEdit
|
|
CommitChanges
|
In the TypeScript file, use the PXFieldOptions.CommitChanges
type parameter when defining the field, as shown in the following
code.
|
DataField
|
Use the name property of the field tag in
HTML to specify the DAC field name, as shown in the following
code.
|
DisplayMode
|
Specify what should be displayed in the selector by using the
config-display-mode property in HTML, as shown in the following
code. The possible values are "both", "id",
and "text".
|
PXSegmentMask
The following table shows the correspondence between PXSegmentMask and 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 |
---|---|
PXSegmentMask
|
Use the field tag, as shown in the following code. The
control represents the selector control if the PXSelector
attribute is specified (or its descendants are specified) for the DAC field in the
name attribute.
In rare cases, you can use the qp-selector tag. |
PXMultiSelector
The following table shows the correspondence between the PXMultiSelector ASPX element and 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 |
---|---|
PXMultiSelector
|
Use the multiSelect property, which is available in the
config attribute of the qp-selector control,
as shown in the following code. The property indicates whether multiple values can
be selected in the control.
|
Parameters
The following table shows the correspondence between Parameters and 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 |
---|---|
Parameters
|
Use the parameters property in the config
property of the qp-selector control. For details, see Selector Control: Selector Parameters.
|