Hi all! Is there any possibility to add hyperlink to the cell of the table? Not in the title of column. Like on screenshot
Hello,
Thank you for reaching out to us.
We suggest using the customizeCell API call to insert a link into the desired HTML element.
Also, we want to notice that z-index
CSS property of cell
should be set to 1
or more to place the link on the top layer. It is achievable using the addClass
method of the cell
parameter:
flexmonster.customizeCell((cell, data) => { cell.addClass("link"); }); .link { z-index: 1; }
You are welcome to see the JSFiddle demonstrating this approach. It uses the "Link" field with id
type to store links themselves. Another approach can be used to associate exact cells on the grid with corresponding links.
Please let us know if it works for you.
Feel free to reach out in case further questions arise.
Best regards,
Illia
Ok tnx, but as I wrote before I want to add links not to the title of the row, I want to add link to value of the column
Hello, Denis,
Thank you for your feedback.
To achieve the desired result, we suggest adjusting the following condition from the previous example:
flexmonster.customizeCell((cell, data) => { if (data.hierarchy && data.hierarchy.uniqueName == "Country" && data.type == "value") { ... } });
For example, to match only cells of the "Cases per year" column, modify the condition as shown below:
flexmonster.customizeCell((cell, data) => { if (data.hierarchy && data.hierarchy.uniqueName == "Cases per year" && data.type == "value" && !data.isGrandTotal) { ... } });
We suggest seeing the JSFiddle we have prepared for the demonstration.
Please let us know if this result fits your needs.
Kind regards,
Illia
Tnx a lot!!!!