3.2.0

Horizontal bar in a cell

Hi,

I searched the forum a little bit but didn't find the relative information, so I post it here. (Please point me to the thread if I missed it, thanks)

Is it possible to create horizontal bars in cells that contain numerical data? We usually can see that in a simple report table that contains two columns, say first column is 'month' and the second column is 'sale value'. The second column, however, instead of showing the numbers it is represented with horizontal bars.

It's straight forward to implement it in a HTML table but I couldn't get it work in AW.grid. Any help? TIA!
Lance
March 14,
In the simplest form you can just put some html inside grid cells and format it with css, for example -

grid.setCellText('<span class="bar" style="width:70%"></span>', 1);

.bar {
display: inline-block;
height: 10px;
background: red;
}
Alex (ActiveWidgets)
March 14,

This topic is archived.

See also:


Back to support forum