getDataColumnName returns the displayName and not the name of a column

Posted by: gerald on 16 August 2020, 7:35 pm EST

  • 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.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.

    When calling getDataColumnName:
    Expected: "rowIndex"
    Got: "Row"

  • Replied 17 August 2020, 9:46 pm EST

    Hi Gerald,

    We are able to replicate the issue at our end hence we have forwarded it to the concerned team for further investigation. We will update you regarding this as soon as we get updates, The internal Tracking ID for this issue will be SJS-5425.

  • Replied 17 August 2020, 10:53 pm EST

    Thank you!
  • Marked as Answer

    Replied 23 August 2020, 4:47 pm EST

    Hi Gerald,

    Devs have informed us that this is by design, further, they are interested in your use-case, could you please provide more information about your use case that why you need the actual name instead of the display name so that we could share it with the dev team.

  • Replied 21 September 2020, 3:07 pm EST

    I wanted to use the column's name in events to identify which field is currently focused. But I don't need this actually, it was just experimental.
    You can close the issue.

    Thank you!
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels