question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Column display label different from column name

See original GitHub issue

I’m submitting a … (check one with “x”)

[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here

Current behavior

No way to provide different column name and display label. Templates can work as a workaround but not convenient.

Expected behavior

We should be able to provide a display label different from column name. Because backed services send data which is closer to an identifier e.g. exchangeRate but in UI you would display it as ‘Exchange Rate’.

Column name should be used to look up value for cell whereas displayLabel should be used for header.

Reproduction of the problem

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

  • Table version: 0.7.x
  • Angular version: 2.0.x
  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
  • Language: [all | TypeScript X.X | ES6/7 | ES5]

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

10reactions
ghostcommented, Aug 10, 2018

@andrew-kuzovov i have a same problem, but it’s simple to use a prop option…

JSON dummyData = [ {data1: ‘Name1’, data2: ‘LastName1’}, {data1: ‘Name2’, data2: ‘LastName2’}, {data1: ‘Name3’, data2: ‘LastName3’} ]

In ngx-datatable cols config:

cols = [ {prop: ‘data1’, name: ‘First Name’}, {prop: ‘data2’, name: ‘Last Name’} ];

This should works.

1reaction
hesptechcommented, Sep 5, 2018
       <ngx-datatable-column name="My Custom Column Header" prop="client">
        <ng-template let-value="value" ngx-datatable-cell-template>
          <strong>{{ value.clientCode }} </strong> - {{ value.clientName }}
        </ng-template>
      </ngx-datatable-column>
Read more comments on GitHub >

github_iconTop Results From Across the Web

Display column name different from dictionary key name in ...
No, pandas doesn't have "labels" for variables. Both labels and variable names are the same thing. There are some feature requests but I...
Read more >
column name is visible along with column label on the form
Solved: Hi, I am seeing column name along with column label. REF:: These fields are an extension of task table and i have...
Read more >
Using the LABEL ON statement in interactive SQL - IBM
Enter LABEL ON COLUMN on the Enter SQL Statements display. · Press F4 (Prompt). The following display appears. · Type the name of...
Read more >
Is it possible to rename column names and axis labels when ...
It is possible to change the column/row names at the worksheet level, even after that column has been used in an answer or...
Read more >
How to display labels on columns or in column side bar
check --or-- uncheck => "use labels for imported column names". NOTE: After you import the SAS dataset and open the resulting .jmp table...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found