<script>
var SUBGrid = AW.UI.Grid.subclass();
SUBGrid.create = function(){
var obj = this.prototype;
obj.PerformSort = function(index,direction){
obj.sort(index, direction);
}
}
var obj = new SUBGrid;
obj.setCellText(function(col, row){return col + "." + row});
obj.setHeaderText( function(col){return col });
obj.setVirtualMode(true);
obj.setColumnCount(5);
obj.setRowCount(10);
document.write(obj);
var BUT1 = new AW.UI.Button;
BUT1.setControlText( 'Do sort' );
BUT1.onControlClicked = function(){
obj.PerformSort('1', "descending" );
alert(obj.getSortColumn() + ' ' + obj.getSortDirection(1) );
}
document.write(BUT1);
</script>
var SUBGrid = AW.UI.Grid.subclass();
SUBGrid.create = function(){
var obj = this.prototype;
obj.PerformSort = function(index,direction){
this.sort(index, direction);
}
}
var obj = new SUBGrid;
...
This topic is archived.