Skip to main content
1-Visitor
August 26, 2016
Question

Change BG Colour of Table Cell in APP Source Edit

  • August 26, 2016
  • 1 reply
  • 1815 views

Dear Users

I have a HTML table with thead,tbody,tr,td elements. I want to style the thead/tr/td with bg colour as "Red" . I am not able to find an option for setting the bgcolour and wanted to try coding in APP Source Edit. Pls advice how to enforce a style for table component in APP Source edit.

PLs help

Regards

Sri

    1 reply

    16-Pearl
    August 29, 2016

    APP Source Edits are not the easiest, but you can read the APP Javascript FOM to understand what objects and methods are available to you. For tables the general method used is that a new object is made to hold the properties for the table/row/cell (fTable, fTableRow, fTableCell), the properties are applied to that object, then a new table/row/cell is inserted with that object (tableStart, tableRowStart, tableCellStart). So you can jump in the middle of that code and add your own backgroundColor as required. BTW, there are also defaults on fTable for defaultCell and defaultRow.

    1-Visitor
    August 29, 2016

    Thanks Gareth that was really an useful piece of information. I am able to bring the bgcolour as expected.

    Is there a way to remove/hide columns in my table. If i try to used block.columns.supress or other options it doesnt help me.

    pls advice.

    16-Pearl
    August 29, 2016

    I'm not sure if blocks can have suppressed columns or not, but that is the correct command for tables. You would have to set up deleted columns before the table begins, and I believe the table must be pre-scanning (not <?tbprescan=0>).