2

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??????

Keren Caelen
  • 1,466
  • 3
  • 17
  • 38

1 Answers1

1

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

:-)

Keren Caelen
  • 1,466
  • 3
  • 17
  • 38