:: Forum >>
Grid (Where did I wander?)
I set up that grid in agreement with examples and I am not getting to show the label 3 and the 4.
var grid = new AW.UI.Grid;
grid.setId("meuGrid");
grid.setCellData(function(col, row){return "cell " + col + "." + row});
grid.setColumnCount(5);
grid.setRowCount(20);
grid.setSelectionMode("single-cell"); // set selection mode to single cell
grid.refresh();
var label1 = new AW.UI.Label;
label1.setId("label1");
label1.refresh();
var label2 = new AW.UI.Label;
label2.setId("label2");
label2.refresh();
var label3 = new AW.UI.Label;
label3.setId("label3");
label3.refresh();
var label4 = new AW.UI.Label;
label4.setId("label4");
label4.refresh();
grid.onSelectedColumnsChanged = function(columnIndicesArray){
label1.setControlText("coluna: [" + columnIndicesArray + "]");
}
grid.onSelectedRowsChanged = function(rowIndicesArray){
label2.setControlText("linha: [" + rowIndicesArray + "]");
}
grid.onCurrentRowChanged = function(row, col) {
label3.setControlText("Campo 1: [" + grid.getCellText(row, col) + "]");
}
grid.onCurrentColumnChanged = function(row, col) {
label4.setControlText("Campo 2: [" + grid.getCellText(row, col) + "]");
}
Thanks.
Tuesday, August 12, 2008
Excuse me, I forgot to put my name.
Lourival Queiroz
Tuesday, August 12, 2008
This topic is archived.
Back to support forum
Forum search