3.2.0

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
August 1,

This topic is archived.

See also:


Back to support forum