Grid column highlighted

Hi,

Is there a way to highlight a column in a grid? For example, changing the column background color and the font color...

Thank you

  Discussion posts and replies are publicly visible

Parents
  • In Editable grid you can use a!richTextDisplayField() ,you can set font and text color 

    = load(
      local!items: {
        {
          item: "Item 1",
          qty: 1,
          unitPrice: 10
        },
        {
          item: "Item 2",
          qty: 2,
          unitPrice: 20
        }
      },
      a!gridLayout(
        label: "Products",
        instructions: "Update the item name, quantity, or unit price.",
        headerCells: {
          a!gridLayoutHeaderCell(
            label: "Item"
          ),
          a!gridLayoutHeaderCell(
            label: "Qty",
            align: "RIGHT"
          ),
          a!gridLayoutHeaderCell(
            label: "Unit Price",
            align: "RIGHT"
          ),
          a!gridLayoutHeaderCell(
            label: "Total",
            align: "RIGHT"
          )
        },
        rows: a!forEach(
          items: local!items,
          expression: a!gridRowLayout(
            contents: {
              a!textField(
                value: fv!item.item,
                readOnly: true()
              ),
              a!integerField(
                value: fv!item.qty,
                align: "RIGHT",
                readOnly: true()
              ),
              a!floatingPointField(
                value: fv!item.unitPrice,
                align: "RIGHT",
                readOnly: true()
              ),
              a!richTextDisplayField(
                label: "",
                value: a!richTextItem(
                  text: dollar(
                    tointeger(
                      fv!item.qty
                    ) * todecimal(
                      fv!item.unitPrice
                    )
                  ),
                  color: "POSITIVE"
                ),
                align: "RIGHT"
              )
            }
          )
        ),
        rowHeader: 1
      )
    )

  • Thank you very much for your quick answer but the want to get this effect (see the picture) in a column instead of a row.

  • 0
    Certified Lead Developer
    in reply to mariom0001

    What would be the use case for such a feature?  Currently, Appian supports clicking on a column header to sort by that column ascending and descending, which is demonstrated by an arrow in the column.

    I'm curious what the use case is for highlighting a column as opposed to selecting a row.

  • Maybe because our users do not realize that the column has been selected just with an arrow in the column header

    :)

Reply Children
No Data