To Customize the Table of a Selector Field
For a selector field, you use the Data Class to add, delete, and sort the columns of the selector table and store the changes in the customization project as a DAC item.
You can customize the table of an original selector field on the data access class (DAC) and graph levels. The following sections provide detailed information:
- To Customize the Table of an Original Selector Field on the DAC Level
- To Customize the Table of an Original Selector Field on the Graph Level
To Customize the Table of an Original Selector Field on the DAC Level
To customize the table of an original selector field for all controls for the field, you should customize the PXSelector attribute of the field in the data access class extension. To do this, perform the following actions:
- Open the field in the Data Class Editor, as described in To Customize a Field on the DAC Level.
- On the More menu (under Actions), click Edit Selector Columns.
- In the Customize Selector Columns dialog box, which opens, make
the required changes.
You can use this dialog box to add new columns to the selector table and to reorder columns in the table. (See Customize Selector Columns Dialog Box for details.)
- Click OK to add the PXCustomizeSelectorColumns attribute for the field in the edit area of the Data Class Editor based on your changes, as shown in the following screenshot.
- Click Save on the editor toolbar to save your changes to the customization project.
To Customize the Table of an Original Selector Field on the Graph Level
To customize the selector table for the selector control on a single form, you should customize the PXSelector attribute of the appropriate field in the graph extension. To do this, perform the following actions:
- Create the code template that includes the field attributes and the DACName_FieldPropertyName_CacheAttached() event handler that replaces the attributes within the graph, as described in To Customize a Field on the Graph Level.
- By using the Code editor, replace the original attributes in the template, as shown in
the following code
snippet.
[PXCustomizeSelectorColumns(<NEW CONTENT OF THE PXSELECTOR ATTRIBUTE>)] protected void DACName_FieldPropertyName_CacheAttached(PXCache cache) { }
- Click Save on the editor toolbar to save your changes to the customization project.