I have make another version of TableViewer, it's a package of Webviewer and Javascript and CSS.
so you can set up the style as you wish, if you know some CSS knowledge.
V6 UPDATE
- SetStyleSheet now can accept url to an external css file.
- add SetClass block, which can set class to a tag or id selector
- add ClearStyle block, which can clear all styles, including the native basic style(table border)
- bring back ShowTable. since this will greatly enhance the performance of the extension.
- add RunJs function and AfterRunJs event.
V5 UPDATE
- add OnScroll event
V4 UPDATE
- add ScroolTo function
- deprecated ShowTable function
V3 UPDATE
- add ClearTabe block.
- other minor fix. Now you can use data rows with different length.
V2 UPDATE
- add SetStyleSheet block, you can write the stylesheet here, if you have too much style to setup. Only the last time to use this block works, since the second time will override first time.
- add ShowTable block. Now every time you change the data and style, you have to call this block to show the table. Specially for those updated from v1.
- add HasHead and HasFoot property. If set to true, it will take the first row of data as head, and last row as foot.
the default value is false. - add SourceCode property to show the source code for easy to debug.
Alll Blocks
block names have indicated what they can do.
data: a list of list
now the sheet socket can accept:
- style sheet like 'th{background-color:lightblue; position:sticky; top:0}'
- online css file path like 'http://your.domain.com/cssfile.css'
- local css file, like '//cssfile.css' (for from assets) or 'cssfile.css' (for from ASD)
Sample blocks
1. basic usage:
2. fix first row on top.
Some useful SetStyle:
set outer margin of table
set background-color of 2nd row:
set font-size of all odd column:
set border-width of cell at row 3 column 3:
Download
for more information please check here:
https://kevinkun.cn/tableviewer/