Breaking Change T933741
Visible to All Users

DataGrid and TreeList - Column names should be unique

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' }] . . .

Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.