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
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.
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.
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>).
Sorry Gareth , not sure to understand this point . You mean to try <?tbprescan=0> in Before Generated text of the table component or to give this entry in JS (Source Edit)
Also can you pls share any article on APP Javascript FOM . I couldnt find one in PTC.
Our company GPSL (www.gpsl.co) offers APP training if you require. The APP Javascript FOM documentation ships with the product within the "Help Center". It is also available at support.ptc.com.