3.2.0

Hey i am struggleing to get the values from Grid

Hey i am struggleing to get the values from Grid.here it is my code and i wanted to retrive the values what ever it has.

Plesase help me in this i am new to this grid
var obj = new AW.UI.Grid;
obj.setSize(700,100);
var myColumns = ["Sl No", "Test Name", "Department", "Stat","routine","Schedule"];
obj.setHeaderHeight(20);
obj.setHeaderText(myColumns);
obj.setColumnCount(6);
obj.setRowCount(0);
obj.setCellEditable(true);
document.write(obj);
var myarray=new Array(1);
var sum;
var serial=0;

// here i am calling the function to assign
function add(){
obj.addRow(serial++);
return true;
}
obj.onRowAdded = function(row){
window.status = "Row added: " + row;
this.setCellText(serial,0,row);
this.setCellText(PMedType,1,row);
this.setCellText(Pmedname,2,row);
this.setCellText(Ppresdosage,3,row);
this.setCellText(Pnod,4,row);
this.setCellText(Pquan,5,row);
sum=0;
sum=sum+row;
}
Here i attched the source code in this




Raghava
December 28,
Try using obj.setCellText(.......);

I'm assuming the variables "serial", "PMedType", "Pmedname" etc.. contains some value? If they don't, then you won't be able to retrieve any value.

To retrieve values from your cells -> obj.getCellText(col,row);
Geoff
December 30,

This topic is archived.

See also:


Back to support forum