I want to send two parameters to a function in a ClientTemplate of a Telerik Grid in Asp.net MVC3.
I did something like this:
columns.Bound(m => m.ID).Title("Delete").ClientTemplate("<a href='#' title='Delete' onclick='return DeleteData(<#=ID#>,<#=Name#>)'><SPAN class='delete'></SPAN></a>").Width(53);
But this is not working.
In this ID
field is an int field and Name
is a string type field. How can I accomplish this task?
Can anyone please help me??????
I resolved my question myself. It can be done like:
columns.Bound(m => m.ID).Title("Delete").ClientTemplate("<a href='#' title='Delete' onclick=\"return DeleteData(<#=ID#>,'<#=Name#>')\"><SPAN class='delete'></SPAN></a>").Width(53);
And its working
:-)