3.2.0

getId() don't get what setId() ?

I am testing a grid with 2 templates. I set the template's id by obj.setId("id"). But when I try to use that id by getCellTemplate().getId(), I couldn't get the id what I set. Following is my code:

var grid=new AW.UI.Grid;
grid.setHeaderText(["check","combo"]);
grid.setColumnCount(2);
grid.setRowCount(2);

var chk = new AW.Templates.CheckBox;
chk.setId("Check");
grid.setCellTemplate(chk, 0,0);

var combo=new AW.UI.Combo;
combo.setId("Combo");
combo.setControlText("Select");
combo.setItemText([1,2,3,4,5,6,7,8,9,0]);
combo.setItemCount(10);
grid.setCellTemplate(combo, 1,0);
grid.setCellText(grid.getCellTemplate(0,0).getId(),0,1);
grid.setCellText(grid.getCellTemplate(1,0).getId(),1,1);
document.write(grid);

Any idea?

Thanks,
mrhsh
May 2,
Actually, I just want to know what the cell's template control is (combo or check). Is there any other way that can work around?

Thanks,
mrhsh
May 2,

This topic is archived.

See also:


Back to support forum