Posted 16 August 2020, 7:35 pm EST
I bound data to a sheet
var colItemId = { name: "itemId", displayName: "Id", size: 70 };
var colParentItemId = { name: "parentItemId", displayName: "Parent Id", size: 70 };
var colItemName = { name: "itemName", displayName: "Name", size: 200 };
var colRowIndentLevel = { name: "rowIndentLevel", displayName: "Level", size: 40 };
var colRowIndex = { name: "rowIndex", displayName: "Row", size: 40 };
this.sheet.autoGenerateColumns = true;
this.dataSource = this.testDataService.loadItemsBasic();
this.sheet.setDataSource(this.dataSource.items);
this.sheet.bindColumn(4, colRowIndex);
this.sheet.bindColumn(1, colRowIndentLevel);
this.sheet.bindColumn(2, colItemId);
this.sheet.bindColumn(3, colParentItemId);
this.sheet.bindColumn(0, colItemName);
When using getDataColumnName I receive the displayName and not the name of the field of the datasource.
Example:
When calling getDataColumnName:
Expected: “rowIndex”
Got: “Row”