Frage

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

War es hilfreich?

Lösung

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

:-)

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top