:: Forum >> Version 1 >>

A bug for Insert or delete row

i am using follow code add row and delete row from grid

add_row:
// var array = obj.getRowProperty("values");
var rowData =["Col1", "Col2","Col3","col4","col5"];
var sort_value = obj.getSortProperty("index");
objdata.push(rowData);
obj.setRowProperty("count", objdata.length);
obj.setSortProperty("index", sort_value);
// refresh the grid
obj.refresh();

delete_row:
var index = obj.getProperty("selection/index");
if (confirm("Are you sure to delete this row?")) {
returnVal = objdata.splice(index,1);
obj.setRowProperty("count", objdata.length);
obj.setSortProperty("index", -1);
obj.refresh();
}

the bug is :after i sorted data,i can't work correctly,
it will report a error,objdata is not a object
anyone can help me ,thanks!
jackyu
Monday, August 1, 2005



This topic is archived.

Back to support forum

Forum search