5

I have a KendoGrid that have a column like:

{
      title: "Column1",
      template: <a href="javascript:customJsFunction(#= data #)">click here</a>',
},

..first this code doesnt work. Im trying to pass the whole "data" (the data for the current row) to a javascript function. Thanks in advance.

Erick Lanford Xenes
  • 1,467
  • 2
  • 20
  • 34

1 Answers1

5

Try this template using JSON.stringify():

"<a href='javascript:customJsFunction(#= JSON.stringify(data) #)'>Click here</a>"

Demo

DontVoteMeDown
  • 21,122
  • 10
  • 69
  • 105