How to sort inside a grid-subclass ? ....
I can't find any method for sorting inside a subclassed grid ( I tried everithing ) , an alert says it's already sorted but dont show it.
And after scrolling a while the cells texts are:
0.undefined 1.undefined ..... and so on
If anyone knows a .. how to, Please advise. Thanks
Here is the testing code:
And after scrolling a while the cells texts are:
0.undefined 1.undefined ..... and so on
If anyone knows a .. how to, Please advise. Thanks
Here is the testing code:
<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>
Carlos
August 20,