diff --git a/source/Ox.UI/js/Form/Ox.Spreadsheet.js b/source/Ox.UI/js/Form/Ox.Spreadsheet.js index 2a7fef3d..14efff0d 100644 --- a/source/Ox.UI/js/Form/Ox.Spreadsheet.js +++ b/source/Ox.UI/js/Form/Ox.Spreadsheet.js @@ -32,9 +32,11 @@ Ox.Spreadsheet = function(options, self) { function addColumn(index) { self.options.columns.splice(index, 0, ''); - self.values = self.values.map(function(columns) { - return columns.splice(index, 0, 0); + Ox.print('sv', JSON.stringify(self.values)) + self.values.forEach(function(columns) { + columns.splice(index, 0, 0); }); + Ox.print('sv', JSON.stringify(self.values)) renderSpreadsheet(); } @@ -63,8 +65,8 @@ Ox.Spreadsheet = function(options, self) { function removeColumn(index) { self.options.columns.splice(index, 1); - self.values = self.values.map(function(columns) { - return columns.splice(index, 1); + self.values.forEach(function(columns) { + columns.splice(index, 1); }); renderSpreadsheet(); }