3.0 beta 2

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
November 26,
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

/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)
November 28,
thank you alex!
mango
November 28,

This topic is archived.

See also:


Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.