Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

#1228. Added more descriptive error message, when trying to insert ne…

…w column to a table with object datasource.
  • Loading branch information...
commit 646794c2eb50d93f11a22cee1460e04f76b9a7cd 1 parent 7e19a3a
@psmolenski psmolenski authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/core.js
View
4 src/core.js
@@ -202,7 +202,9 @@ Handsontable.Core = function (rootElement, userSettings) {
*/
createCol: function (index, amount) {
if (priv.dataType === 'object' || priv.settings.columns) {
- throw new Error("Cannot create new column. When data source in an object, you can only have as much columns as defined in first data row, data schema or in the 'columns' setting");
+ throw new Error("Cannot create new column. When data source in an object, " +
+ "you can only have as much columns as defined in first data row, data schema or in the 'columns' setting." +
+ "If you want to be able to add new columns, you have to use array datasource.");
}
var rlen = instance.countRows()
, data = GridSettings.prototype.data
Please sign in to comment.
Something went wrong with that request. Please try again.