update a column
update a column
dsr_22
Posts: 2Questions: 0Answers: 0
i want update a row, and update all data's 'isoCountryNm'
so i put fnUpdate in a "for" , it works fine in chrome , but in IE8 the code will become slow and a dialog show a message to inform me stop the script, if i select no, program will continue , if select yes, program will stop
[code]
var allData = oTable.fnSettings().aoData;
for(var i = 0; i < allData.length; i++) {
if (isoCountryNm == allData[i]._aData["isoCountryNm"])
{
oTable.fnUpdate(updatedCountryNm , i, 2);
}
}
[/code]
so i think another way to solve the problem
[code]
var allData = oTable.fnSettings().aoData;
for(var i = 0; i < allData.length; i++){
if(isoCountry2charCD == allData[i]._aData["isoCountry2charCD"]){
allData[i]._aData["isoCountryNm"] = updatedCountryNm;
}
}
oTable.fnDraw();
[/code]
but it is not work. i change the aoData but the page is not reDraw. I also try oTable.fnStandingRedraw() it is not work .
er... how can i update a column ?
so i put fnUpdate in a "for" , it works fine in chrome , but in IE8 the code will become slow and a dialog show a message to inform me stop the script, if i select no, program will continue , if select yes, program will stop
[code]
var allData = oTable.fnSettings().aoData;
for(var i = 0; i < allData.length; i++) {
if (isoCountryNm == allData[i]._aData["isoCountryNm"])
{
oTable.fnUpdate(updatedCountryNm , i, 2);
}
}
[/code]
so i think another way to solve the problem
[code]
var allData = oTable.fnSettings().aoData;
for(var i = 0; i < allData.length; i++){
if(isoCountry2charCD == allData[i]._aData["isoCountry2charCD"]){
allData[i]._aData["isoCountryNm"] = updatedCountryNm;
}
}
oTable.fnDraw();
[/code]
but it is not work. i change the aoData but the page is not reDraw. I also try oTable.fnStandingRedraw() it is not work .
er... how can i update a column ?
This discussion has been closed.
Replies
[code]
var allData = oTable.fnSettings().aoData;
for(var i = 0; i < allData.length; i++) {
if (isoCountryNm == allData[i]._aData["isoCountryNm"])
{
oTable.fnUpdate(updatedCountryNm , i, 2, false, false);
}
}
oTable.fnDraw();
[/code]
You couldn't have been much closer :-)
Allan
Sean