How retrieve the Cell Format for specified column?
I tryied but got nothing...
grid.getCellFormat(column);
grid.getCellFormat(column, row);
grid.getCellFormat(column, row, cel);
grid.getCellFormat(cel, column, row);
Anyone hav idea? tkz.
Paulo Cesar Silva Reis (PC from Brazil).
May 12,
The default value for the cell format is null. So unless you set the format to something - those calls will return null. The correct syntax would be
grid.getCellFormat(column); // for the column
grid.getCellFormat(column, row); // for the specific cell
Alex (ActiveWidgets)
May 12,
doenst work for me, see my example:
var extendedGrid = new AW.Grid.Extended;
extendedGrid.setCellFormat([new AW.Formats.Number, new AW.Formats.String, new AW.Formats.String, new AW.Formats.Number]);
...
document.write(extendedGrid);
var b1 = new AW.UI.Button;
b1.setControlText("getCellFormat?");
b1.setEvent("onclick", function() { alert(extendedGrid.getCellFormat(1));});
document.write(b1);
Maybe a bug when use ExtendedGrid ?
Paulo Cesar Silva Reis (PC from Brazil).
May 12,
Works for me (?), if you change alert to typeof .. you should get "object" -
alert(typeof extendedGrid.getCellFormat(1));
Alex (ActiveWidgets)
May 12,
wow... thats weird... i always get blank value, but typeof works, its show "object"... man, wtf? heheh. What can be? I really dunno.
Paulo Cesar Silva Reis (PC from Brazil).
May 15,
alert function shows blank value because this is what default toString() method returns for all AW objects.
Alex (ActiveWidgets)
May 15,
i got a solution, not good but works.
if(extendedGrid.getCellFormat(1) instanceof AW.Formats.String) {
}
Paulo Cesar Silva Reis (PC from Brazil).
May 15,