:: Forum >>

how to apply css file to a column in grid?

i already have a css file with styles defined such as

date-col {
background-color: #def;
etc
}

amt-col {
background-color: #eee;
etc
}

how can i apply the style by name to columns in the grid? i only know how to do set individual style like this:

awGrid.getCellTemplate(col, row).setStyle("background-color", "orange");

but it would be nice to be able to apply date-col, amt-col rather than each attribute of it.

thanks
mango
Monday, November 26, 2007
You can use setClass(name, value) method but your classes shoudl be named according to AW rules, i.e. .prefix-name-value, where prefix=aw

http://www.activewidgets.com/aw.system.html/setclass.html

for example,

.aw-col-date {
...
}

.aw-col-amt {
...
}

grid.getCellTemplate(i).setClass("col", "date");
grid.getCellTemplate(ii).setClass("col", "amt");
Alex (ActiveWidgets)
Wednesday, November 28, 2007
thank you alex!
mango
Wednesday, November 28, 2007

This topic is archived.


Back to support forum

Forum search