:: Forum >> Version 1 >>

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;
}
Thierry
Monday, July 4, 2005
sorry
the answer is in this forum

see resorting after inserting/deleting rows by rag

I Think that solution should be included internaly in the next version.

Thank a lot to rag
Thierry
Monday, July 4, 2005



This topic is archived.

Back to support forum

Forum search