:: Forum >>

trying to subclass Grid

Hi there I've been trying to build a subclass to wrap all the initialization methods of AW

I can't get the alternating colors to work....

Any idea?

Active.Controls.CoolGrid = Active.Controls.Grid.subclass();

Active.Controls.CoolGrid.create = function(){

var obj = this.prototype;
var _super = this.superclass.prototype;
    
    
    var row = new Active.Templates.Row;
    row.setStyle("background", function(){return this.getProperty("row/order") % 2 ? "#FFFFE1" : "white"});
    [b]_super.setTemplate("row", row);[/b] // I also tried obj.setTemplate, this.setTemplate....
}


Sam
Saturday, January 15, 2005
Sam,

I've subclassed the grid widget, see: http://www.activewidgets.com/javascript.forum.2987.4/subclassing-the-active-controls-grid.html

Frank Gualtieri
Frank Gualtieri
Monday, August 29, 2005

This topic is archived.


Back to support forum

Forum search