How to: Set Up Commands Behind Data Table Columns

In this article

Setup for the data grid control

Setup for the data table columns

Examples

In various POS data grids, you can have commands behind data table columns in a data table. The command is executed for a line when the user selects the field (column) that includes a POS command for that column.

This is very useful when space in a panel is limited:

  • Instead of having a button on a POS menu with a command that applies to a selected line in the panel grid, the same command can be directly behind a column in the grid.
  • To have multiple commands behind a column, you can use the POPUP command that pops up a POS menu with the commands that apply to the selected line and column.
  • For the journal data grid, you can use the JNL_LINE_EDIT command to display a POS menu with commands that apply to the type of journal line selected. Commands that don't apply to the line appear disabled, showing the user visually which command buttons will result in an error if pressed. This is particularly useful when working with deals and items with modifiers.
  • To dedicate one column to a command (the line does not include a field of the connected table), you need to select a source expression for the column in the Source Expr. ID field. There are several source expression POS tags that display an icon: Arrow up, arrow down, edit (pencil), ellipses, plus, minus, trash. You can use a font awesome expression like <#fa-pencil> or <#fa-ellipses-h>.

This is possible for the following grids or grid types:

  • the journal grids (Sales POS)
  • the split bill grids (Hospitality)
  • the transfer grids (Hospitality)
  • the allocation grids (Hospitality)
  • the reservation grids (Hospitality).

An example of this is a panel layout for small devices. In the Demo data, the #HOSP-PHON interface profile used on POS Terminal P0080 contains several data tables with commands behind columns in order to reduce the amount of menu buttons needed.

Setup for the data grid control

The POS data grid control that contains the POS data table you want to add a column command to must have the Notify Marked Count Changed check box selected.

Setup for the data table columns

  • Open the POS data table you want to add a column command to.
  • Select the appropriate column.
  • Select the command in the POS Command Code field and the parameter selected in the Parameter field, if needed.
  • If the column does not contain a field in the connected table, you need to select a source expression in the Source Expr. ID field.

Examples

POS command QTYCH behind the Quantity column in a journal data grid:

POS command POPUP with a POS menu behind the Amt. column in a journal data grid: