3.0.0

Align Text In An Individual Cell

I am passing an array of values (generated from php) into a one-column grid. Depending on the value, I would like to have the text in the cell either center- or left-aligned.

Here is the code I wrote to do this:

function cell_align()
{
var value = this.getItemProperty("value");
if (value == "TestValue")
{ return "center";}
return "left";
}

var row = new Active.Templates.Row;
row.setStyle("text-align", cell_align);

At the moment all of the cells are left-aligned. I know that the value is correct and true for the test.

Please let me know if this is doable.

Thanks.
JeffE
December 9,
And vertically?
Alignlover
December 10,

This topic is archived.

See also:


Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.