this.setAttribute( '_lineColor' , s.bordercolor ); if ( p == "content" ){ if ( !_contentsPackage ){ this._contentsPackage = []; } var a = {}; //need to make a new object here, to make sure that we're not //(later) assigning to the class attribute for ( var k in v._instanceAttrs ){ a[ k ] = v._instanceAttrs[ k ]; } var o = { 'class': v.constructor, attrs: a }; if ( typeof( v._instanceChildren ) != "undefined" ){ o.children = v._instanceChildren; } this._contentsPackage.push( o ); //sadly, we really don't need this v.destroy(); return this; } else if ( p == "header" ){ return this; } else if ( p == "gridcontent" ){ return parent.content; } else { return super.determinePlacement(v, p, args); } if ( !this._contentsPackage ) return null; var fupdCellBounds = function(ignore=null) { //'this' points to the grid cell this.setAttribute('x', this.ownerColumn.x ); this.setAttribute('width', this.ownerColumn.colwidth ); }; var contentspkg = this._contentsPackage; if ( contentspkg.length == 1 ) { var o = contentspkg[ 0 ]; var cellargs = o.attrs; cellargs.ownerColumn = this; cellargs._updateCellBounds = fupdCellBounds; return o; } else { //there's more than one subview, so we need to pack them up return { 'class': lz.view, attrs: {ownerColumn: this, _updateCellBounds: fupdCellBounds}, children: contentspkg }; } if ( this.sortpath == "" ){ this.setAttribute( 'sortpath' , this._inferSortpath() ); } super.init(); if ( this.ascendsort ){ if ( this.ascendComparator ){ // Debug.write( this.ascendComparator); return this.ascendComparator; } else if ( this.datatype == "number" ){ return this._numericAscendingSort; } else { return "ascending"; } } else { if ( this.descendComparator ){ return this.descendComparator; } else if ( this.datatype == "number" ){ return this._numericDescendingSort; } else { return "descending"; } } y ){ return 1; } else if ( x == y ){ return 0; } else { return -1; } } else if ( yisnum ){ return 1; } else { return -1; } ]]> An abstract column in a grid.

basegridcolumn can be used in basegrids or grids to customize the look of both the column header and the row contents for that column. In cases where a standard column header look is desired, but the contents may vary, use gridcolumn.

The placement of "header" can be used to place nodes in the header of the grid, and the default placement for the class will place things in the row. See the example in basegrid.