How to call react function in column render function ?

How to call react function in column render function ?

gaurav9904gaurav9904 Posts: 1Questions: 1Answers: 0

Following is my code:

{
data: "vfdSno",
render: function (data, type, row) {
return '<a onClick={' + this.handletableclick.bind(this, row) + '} >' + data + '</a>'
}
},

So, this is generating error.
Also, for more code please go to the link: https://stackoverflow.com/questions/54343049/how-to-put-onclick-in-column-of-data-tables

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @gaurav9904 ,

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

This discussion has been closed.