add and delete a row
function add() is ok (before or after column sorting)
but function delete() is not ok:
after an add
or after sorting a column
it is just ok before adding or sorting
Please give me a solution
function add(){
maxid++;
var a = obj.getRowProperty("values"); ligne=obj.getRowProperty("count");
data1.push([maxid,"","","","","","","","",""]);
a.push(data1.length - 1);obj.setRowProperty("values", a);
obj.setRowProperty("count", ligne+1);obj.setSelectionIndex(ligne);
obj.refresh();
scrollIntoView(obj,ligne);
document.saisie.C0.focus();
}
function supp(){
if(nonmod) return;
if (confirm('Confirmer la suppression ' +ligne)){
var a = obj.getRowProperty("values");
var ret = data1.splice(ligne,1);
obj.setRowProperty("count", data1.length);
obj.refresh();
}
return;
}
but function delete() is not ok:
after an add
or after sorting a column
it is just ok before adding or sorting
Please give me a solution
function add(){
maxid++;
var a = obj.getRowProperty("values"); ligne=obj.getRowProperty("count");
data1.push([maxid,"","","","","","","","",""]);
a.push(data1.length - 1);obj.setRowProperty("values", a);
obj.setRowProperty("count", ligne+1);obj.setSelectionIndex(ligne);
obj.refresh();
scrollIntoView(obj,ligne);
document.saisie.C0.focus();
}
function supp(){
if(nonmod) return;
if (confirm('Confirmer la suppression ' +ligne)){
var a = obj.getRowProperty("values");
var ret = data1.splice(ligne,1);
obj.setRowProperty("count", data1.length);
obj.refresh();
}
return;
}
Thierry
July 4,