3.2.0

Placing Buttons in a grid

Hi All,

Any one could help me out in this problem. I want to set buttons in an entire column of a grid. The following is the piece of code which iam using to set buttons in a grid.

Var objGrid=new AW.UI.Grid;
Var objButton=new AW.UI.Button;

objButton.onClick=function(event){
alert("Clicked");
};

objGrid.setCellTemplate(objButton,0);
objGrid.setColumnCount(2);
objGrid.setRowCount(10);
document.write(objGrid);
Narayana
December 11,
Hi

I find the solution for that the below code will solves the problem.

objAlertsGrid.setCellText(function(col,row){
if(col==0){
objAdhocButton=new AW.UI.Button;
objAlertsGrid.setCellTemplate(objAdhocButton,col,row);
objAdhocButton.setControlImage("favorites"); objAdhocButton.setAttribute("type","button");
objAdhocButton.setAttribute("aw", "control"); objAdhocButton.setAttribute("value",objAlertsXMLGrid.getData(col,row)); objAdhocButton.onControlClicked=function(event){
alert(this.getAttribute("value"));
};
return objAdhocButton;
}else{
return objAlertsXMLGrid.getData(col,row);
}
});

But i didnt find out how to set the height of a row and while displaying buttons column is disaligned
Narayana
December 11,

This topic is archived.

See also:


Back to support forum