3.2.0

How can I choose style class of column through javascript?

I am trying to set the style class of a column through javascript, but it is not working. Here is a stripped down version of what i have.
<style>
    .active-a-b{width: 100px;}
</style>
<script>
    var obj = new Active.Controls.Grid;
    obj.setRowProperty("count", data_rows.length);
    obj.setColumnValues([0,2,3,4,5,6]);
    
    obj.setDataProperty("text", function(i, j){return data_rows[i][j]});
    obj.setColumnProperty("text", function(i){return data_columns[i]});

    obj.setRowHeaderWidth("28px");
    obj.setColumnHeaderHeight("20px");

    var column = new Active.Templates.Text;
    column.setClass("a","b");
    obj.setTemplate("column", column, 0);

    document.write(obj);
</script>


It sets the style properties if i use column.setStyle("width", "100px"), but the column does not resize with the header if the width is set this way.

Thank you
Josh
June 29,

This topic is archived.

See also:


Back to support forum