:: Forum >>

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
Friday, May 2, 2008
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
Friday, May 2, 2008

This topic is archived.


Back to support forum

Forum search