AddRow() when fails datasoure is empty
When the grid is empty, the function AddRow() doesn't work properly and values are not correct . Any idea?
Thanks in advance, Here is a sample of code:
var myData = [];
var myColumns = ["Col1", "Col2"];
var grid = new AW.UI.Grid;
grid.setId("myGrid");
grid.setCellText(myData);
grid.setHeaderText(myColumns);
grid.setRowCount(0);
grid.setColumnCount(2);
grid.refresh();
function add(){
var num_rows = grid.getRowCount();
num_rows++;
myData[num_rows] = ['',''];
grid.addRow(num_rows);
}
Thanks in advance, Here is a sample of code:
var myData = [];
var myColumns = ["Col1", "Col2"];
var grid = new AW.UI.Grid;
grid.setId("myGrid");
grid.setCellText(myData);
grid.setHeaderText(myColumns);
grid.setRowCount(0);
grid.setColumnCount(2);
grid.refresh();
function add(){
var num_rows = grid.getRowCount();
num_rows++;
myData[num_rows] = ['',''];
grid.addRow(num_rows);
}
Marc
October 30,