:: Forum >>

how to set column,SOS

how to use javascript let column data align center dynamic,not by using the following css:
aw-column-0 {text-align: center};

the grid column has such attribute?

Thks.
Clark.chen
Monday, February 2, 2009
grid.setColumnWidth(width, colIndex);

or

grid.setColumnWidth([w1, w2, w3, ...]);


http://www.activewidgets.com/aw.ui.grid/column-width.html
Alex (ActiveWidgets)
Monday, February 2, 2009
I use the following code:

var stylesheet = document.styleSheets[document.styleSheets.length-1];
stylesheet.addRule(".aw-column-"+i, "text-align: right");
clark.chen
Tuesday, February 3, 2009
Sorry, I was answering the wrong question here :-(

Yes, your code is correct. You may also add grid id selector if you are using multiple grids -

stylesheet.addRule("#myGrid .aw-column-" + i, "text-align: right");
Alex (ActiveWidgets)
Tuesday, February 3, 2009

This topic is archived.


Back to support forum

Forum search