You are here:
Understand Media Grid Configuration Attributes
The media grid offers features for sorting and grouping, and supports various input fields.
This is an Advertising Sales Management on Managed Package feature. For Advertising Sales
Management on Salesforce Platform, see Advertising
Sales Management on Salesforce Platform.
sfiAdsDataGridis a Lightning Web Component (LWC) that renders the media grid according to your specified configurations. Refer to these tables to understand the available parameters you can use to customize this LWC.
Once you're ready to begin customizing, see Customize the Media Planning Grid with Pagination Enabled.
| REQUIRED EDITIONS |
|---|
| Available in: Lightning Experience |
| Available in: all editions |
Attributes
| Attribute | Input Type | Description | Release |
|---|---|---|---|
| columns | array of objects | Each object is the configuration of each column. The grid columns populate according to the order of the objects added in the array. This object is explained in detail in the Columns Configuration section. | All |
| records | array of objects | Each object contains the values for a row | All |
| userSelectableColumn | boolean | Enables the feature to hide and show columns which is displayed from the Settings icon in the UI. | All |
| issortavailable | boolean | Enable sorting. | All |
| issearchavailable | boolean | Enable search bar in grid. | All |
| rowCustomActions | array of objects | Enables a custom action dropdown at the end of each row. The object must have label and value nodes. | All |
| hasStickyLeftColumn | boolean | If true, the first column will be sticky to the left of the window when the horizontal scroll is available. | All |
| showTableFooter | boolean | Enable footer of the grid. | All |
| gridButtonLabel | string | Enable a button above the grid with the value as label. | All |
| hasGridEndButton | string | Enable an extra button above the grid. | All |
| gridEndButtonName | string | Set the label for the extra button above the grid. | All |
| totalValues | array of objects | Where each object is the configuration for the footer values. This object is explained in detail in the Footer configuration section. | All |
| tablename | string | Name of the media type. This is useful when there are multiple grids used. The pubsub must have the tablename prefix if this attribute is set. | All |
| showFilter | boolean | Enable filter component in the grid. | Winter '23 and later |
| userSelectableRow | boolean | Enables checks to select a row. | Spring '23 and later |
| showGroupSize | boolean | Shows the number of rows inside a group when grouping is enabled. | Spring '23 and later |
Columns Configuration
The column is configured according to the data set in the column attribute. The expected value for this attribute is an array of objects where each object is the configuration for each column. This section explains about the configuration (node) available for an object.
| Node | Input Type | Description | Release |
|---|---|---|---|
| fieldName | string | The name of the node in records array which holds the value for this column. | All |
| label | string | Label for the column header. The exact text or custom label name can be set here. | All |
| Placeholder | string | Optional node to set what value need sto be displayed as placeholder, if the value is not present. | All |
| searchable | boolean | Allow grid to search in this column. | All |
| sortable | boolean | Allow sorting for this column. | All |
| type | string | Defines type of the column data. Text by default. Available options include checkbox, currency, date, datetime, email, number, percent, text, textarea, url, icon, typeahead, picklist, multiselect, and typeaheaddate. | All |
| editable | boolean | Defines whether the column is editable | All |
| displayEdition | string | The name of the node in records array to hide the edit icon of a call. | All |
| visible | boolean | Defines whether the column is visible by default. | All |
| userSelectable | boolean | Allow column to be shown and hidden from the grid settings icon. | All |
| optionField | string | List the options to be displayed when type is set to typeahead, picklist, or multiselect. | All |
| helperField | string | The name of the node in the records array to be shown as the secondary value blow the actual value of the column. | All |
| preFix | string | The name of the node in the records array which holds the prefix for the actual value of the column. | All |
| postFix | string | The name of the node in the records array which holds the postfix for the actual value of the column | All |
| postFixClass | string | The Class to be applied on the postfix. | All |
| errorMessage | string | The name of the node in the records array which holds error messages for the cell. | All |
| textAlign | string | Horizontal alignment of text in the cell, whether left, center, or right. | All |
| cellClass | string | Extra class to be added on the cell. | All |
| columnWidth | string | The width of the column in percentages. | All |
| conditionalIcon | string | The name of the node in the records array which holds the icon name to be displayed in the cell. | All |
| hasCellError | string | The name of the node in the records array which holds the value true when there in an error that needs to be highlighted. | Spring '22 and later |
| conditionalToolTip | string | The name of the node in the records array which holds the value for the tooltip message in the cell. | Spring '22 and later |
| hasToolTipHeader | boolean | Enables tooltip in the column header. | Spring '22 and later |
| toolTipHeaderText | string | The name of the node in the records array which holds the value for the tooltip message in the column header. | Spring '22 and later |
| showCaret | boolean | Enables collapse or expand functionality for bundle rows. | Spring '22 Patch and later |
| disableEditForChild | boolean | Disables typeahead edit for child rows. | Spring '22 Patch and later |
| disableIfTrue | string | The name of the node in the records array to disable a cell edit and gray out the cell. | Spring '22 Patch and later |
| hasSpinner | boolean | Enable row-level spinner capability. | Summer '22 and later |
| displayCellLink | string | Label for the hyperlink. | Summer '22 and later |
| cellLinkLabel | string | Label for the hyperlink. | Summer '22 and later |
| minTypeAheadDate | string | The name of the node in the records array which holds the value for the minimum date in the typeaheaddate type column. | Summer '22 and later |
| maxTypeAheadDate | string | The name of the node in the records array which holds the value for the maximum date in the typeaheaddate type column. | Summer '22 and later |
| optionLabelNode | string | The name of the node in option list object, which holds the value for labels. | Winter '23 and later |
Available PubSubs
These PubSubs are all channel names. The event name while registering each PubSub is the result. If the tablename attribute is set to the grid, then the PubSub name has the value of the tablename attribute appended to it.
The following PubSubs are fired from the grid.
-
ads-data-cell-update<_tablename>. Fires whenever a cell in the grid is edited.
-
ads-data-table-header-button<_tablename>. Fires when the button in the header row of the grouped grid is clicked.
-
ads-data-table-button<_tablename>. Fires when the button above the grid header is clicked.
-
ads-data-grid-end-button<_tablename>. Fires when the end button above the grid header is clicked.
-
ads-data-row-custom-action<_tablename>. Fires when an action from the down caret at the end of the row is clicked.
-
ads-data-cell-onchange<_tablename>. Fires when the multi-select field value changes.
-
ads-data-cell-link-clicked<_tablename>. Fires when the hyperlink in the cell is clicked. This is available in the Winter '23 release and later.
-
ads-data-row-select-group<_tablename>. Fires when the row select checkbox is selected or unselected on the group level. This is available in Spring '23 and later.
-
ads-data-row-select-all<_tablename>. Fires when the row select checkbox is selected or unselected on the table level. This is available in Spring '23 and later.
-
print-custom-event__<actionname>. Fires when a custom action is invoked from the row drop down menu for Print placements. When this pubsub is fired, the following information is provided.
-
actionData. Data about the custom action, including name, value, and so on.
-
cartId. Unique Identifier for the quote.
-
row. Data about the placement for which the action is invoked.
-
dataArrayIndex. Index of the row in the grid for which the action is invoked.
-
planType. Type of Print plan; whether multi-issue or per-issue.
-
-
radio-custom-event__<actionname>. Fires when a custom action is invoked from the row dropdown menu for Radio placements. When this pubsub is fired, the following information is provided.
-
actionData. Data about the custom action, including name, value, and so on.
-
cartId. Unique Identifier of the quote.
-
row. Data about the placement for which the action is invoked.
-
dataArrayIndex. Index of the row in the grid for which the action is invoked.
-
planType. Type of the media plan.
-
calendarType. Type of the calendar; whether weekly or daily.
-
areFieldsReadOnly. Boolean value that denotes whether the row is read-only.
-
The following PubSubs are registered in the grid:
-
update-grid-button-state<_tablename>. Enables or disables the button above the grid header. If the tablename attribute is set to the grid, then the PubSub name has the value of the tablename attribute appended to it.
