Binding to Hyperlink text and value

Posted by: stephen.young on 6 November 2019, 10:22 pm EST

    • Post Options:
    • Link

    Posted 6 November 2019, 10:22 pm EST

    Hi,

    How can I bind different different values to the text and value properties of a Hyperlink cell? I am using data-binding and a ssjson template.

    eg. text = “A description”, value = “http://alink.com

    I have tried looping through all rows, getting the cell for the hyperlink column and setting text and value but it is only showing the URL in the link and no description.

    Thanks

  • Posted 7 November 2019, 3:58 pm EST

    Hi Steve,

    You need to set use the HyperLink cell type and set the display-text using the text method of HyperLink cell type. Please refer to the following sample which demonstrates the same:

    https://www.grapecity.com/spreadjs/demos/features/celltype/hyperlink/purejs

    Regards

    Sharad

  • Posted 7 November 2019, 9:38 pm EST

    Thank you Sharad. That works well.

    Steve

Need extra support?

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

Learn More

Forum Channels