Hi,
I have a Telerik grid data bound column which has a template.
The problem I am having is when I click the image button generated in the column, I get a JavaScript error saying 'missing ) after argument list'
The thing is, if the description passed through is a number (e.g. 12) then the JavaScript method runs successfully, however, if description is a string (e.g. test) then it throws this error.
Please can someone offer me some advice on how I can fix this and where I am going wrong as I am struggling to find the solution.
The following is my code - client template part works perfect, it's just the template part that the above problem is happening in.
Thank you very much.
columns.Bound(o => o.Id)
.Template(@<text> <ul class="class1">
<li class="class2"><a href="#" onclick="myMethod(@item.Id, @item.Description);"></a></li>
</ul>
</text>)
.ClientTemplate("<ul class='class1'>" +
"<li class='class2'><a href='#' onclick='myMethod(<#=Id#>, \"<#=Description#>\")' ></a></li> " + "</ul>")