BUG 9152 addGridRow intermittent in Preview panel

PROBLEM  cannot addrows into a grid after change the preview tab, seemd ther are two different instances of grid.
FIX  grid.js was taking the ancient instange of the grid, since a new one is been displayed th old not. the addGridRow() method not points to the new instance.
This commit is contained in:
Ralph Asendeteufrer
2012-10-08 16:22:25 -04:00
parent 142eb15027
commit 43939268ce

View File

@@ -342,6 +342,7 @@ var G_Grid = function(oForm, sGridName){
};
this.addGridRow = function() {
this.oGrid = document.getElementById(this.sGridName);
var i, aObjects;
var defaultValue = '';
var n,a,x;
@@ -629,13 +630,16 @@ var G_Grid = function(oForm, sGridName){
}
if (this.aFields.length > 0) {
alert("set fields "+this.aFields.length)
this.setFields(this.aFields, currentRow);
}
if (this.aFunctions.length > 0) {
alert("set fields "+this.aFunctions.length)
this.assignFunctions(this.aFunctions, 'change', currentRow);
}
if (this.aFormulas.length > 0) {
alert("set fields "+this.aFormulas.length);
this.assignFormulas(this.aFormulas, 'change', currentRow);
}
@@ -679,6 +683,7 @@ var G_Grid = function(oForm, sGridName){
}
//Fires OnAddRow Event
if (this.onaddrow) {
alert("addrow");
this.onaddrow(currentRow);
}
};