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.

Different cellTemplate for each row

See original GitHub issue

[ ] bug report => search github for a similar issue or PR before submitting [ X ] feature request [ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter


**Current behavior**
Today I set the cellTamplate for each column.

**Expected behavior**
I'd like to set a specific [routerLink] for each cell in specific column for each row.

**What is the motivation / use case for changing the behavior?**
Each cell for the Name column should have a cell template with different href or different [routerLink] for each row.

**Please tell us about your environment:**
<!-- Operating system, IDE, package manager, HTTP server, ... -->

* **Table version:** 0.8.x
<!-- Check whether this is still an issue in the most recent table version -->

* **Angular version:** 2.0.x
<!-- Check whether this is still an issue in the most recent Angular version -->

* **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 ]
<!-- All browsers where this could be reproduced -->

* **Language:** [all | TypeScript X.X | ES6/7 | ES5]

Issue Analytics

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

github_iconTop GitHub Comments

4reactions
wizarrccommented, Sep 25, 2017

@nssantos I was just in the process of typing this:

you can use let-row="row" to get access to the entire row data like this below:

<ngx-datatable-column name="Name">
      <ng-template let-value="value" let-row="row" ngx-datatable-cell-template>
            Hi: <strong>{{value}}</strong>
            <a href="{{row.anyRowVariable}}">{{row.anotherRowVariable}}</a>
      </ng-template>
</ngx-datatable-column>
0reactions
AmrMekkawycommented, Nov 20, 2018

Also, this example may help. It has more details about what @wizarrc mentioned in his reply

Read more comments on GitHub >

github_iconTop Results From Across the Web

dxDataGrid using different cell template in the same cell for ...
Hello,. To accomplish this task, I suggest you use a custom cellTemplate and add the required content depending on a row index. You...
Read more >
How to set cell template element's dependency property upon ...
I want to set this element's IcFontColor property using a trigger when it's row is selected. <DataGridTemplateColumn Header="{x:Static lp: ...
Read more >
DataGridTemplateColumn.CellTemplate Property
Gets or sets the template to use to display the contents of a cell that is not in editing mode.
Read more >
317 Custom Templates - Angular UI Grid
In this example we create a grid almost the same as the most basic one, but with a custom row template, and with...
Read more >
Create your own cell template | ReactGrid
Creating a cell template is the best way to customize data visualization and behaviour in ReactGrid. You can define your own one and...
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