Access data from other cells in columns render function #429
Replies: 5 comments 2 replies
-
|
I can access it like this, but it doesn't feel very nice: |
Beta Was this translation helpful? Give feedback.
-
|
I have tried to use above suggestion but (datatable.data.data[rowIndex].cells[cellIndex - 1].data[0].data) but it does not work from what I can see, databable is only available after the full loading of the datatable and so not available in the column render (datatable is null in the render) am I doing anything wong ? has anyone manage to get the data of other column for the current row in the column render ? help would be appreciated. thanks in advance |
Beta Was this translation helpful? Give feedback.
-
|
@bernard-dandrea Could you provide an example showing what it is you are trying to do? |
Beta Was this translation helpful? Give feedback.
-
|
If you need to use different cells within the same row for the rendering, you can use rowRender: https://fiduswriter.github.io/simple-datatables/documentation/rowRender |
Beta Was this translation helpful? Give feedback.
-
|
thanks for your support see the attached example: uncomment lines 69 then 102 to see the problem note that you will have to change the path to the module in line 85 let me know if you need anything else |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Is it possible to access the data of other cells in the render function for a column? I would like to create a link in a cell using the cell's current data as the link label, but the previous cell's data for the href. e.g.
Beta Was this translation helpful? Give feedback.
All reactions