What Changed
In v20.2 and newer, the DataGrid/TreeList widget generates the name option's value based on the dataField option, and the name option value of each column should be unique. Otherwise, the DataGrid/TreeList will throw an E1059 error.
Reasons for Change
In v20.2, the widget allows you to switch a certain cell to editing mode using the editing.editRowKey and editing.editColumnName options. For the feature to work correctly, both these options should uniquely identify a row/column. Since editing.editColumnName should correspond to the name option value of a column, the name option of each column should be unique.
Impact on Existing Apps
If two columns have the same dataField, the widget will generate the same names. In this case (or if you define the same column names yourself), the widget throws an E1059 error:
JavaScript. . .
columns: [{
dataField: 'myField'
}, {
dataField: 'myField'
}]
. . .
or
JavaScript. . .
columns: [{
dataField: 'myField',
name: 'myField'
}, {
dataField: 'myField2',
name: 'myField'
}]
. . .
To solve this issue in v20.2, you need to define unique column names for columns with duplicated dataFields:
JavaScript. . .
columns: [{
dataField: 'myField' // this column has autogenerated name 'myField'
}, {
dataField: 'myField',
name: 'myField2' // this column has defined name 'myField2'
}]
. . .
or
JavaScript. . .
columns: [{
dataField: 'myField',
name: 'myField'
}, {
dataField: 'myField2',
name: 'myField2'
}]
. . .