Pass 2 parameters in ClientTemplate KendoGrid in MVC4

690 views Asked by At

I'm new to Kendo.ui and i have troubles to understand the calls using #=.

I want to pass a second parameter to my controller, but I cannot make it work properly, it either don't display the grid or kill the button. Here is my code :

.ClientTemplate("<a onclick=\"AjaxUrlTo('" + @Url.Action("AddOrUpdate", "Area") + "?areaId=#= Id #')\" class=...");

And here is what I've tried :

"?areaId#: Id#&customerId#: Site.CustomerId#') 
"?areaId=#= Id#&customerId=#= Site.CustomerId#') 
"?areaId=#= Id #'" + "?customerId=#= Site.customerId #')
"?areaId=#= Id #, ?customerId=#= Site.customerId #')
"?areaId=#= Id"+" '&customerId=#= Site.CustomerId#')
"?areaId=#= Id"+"'?customerId#=42#')

Any clue about what I'm doing wrong ?

1

There are 1 answers

0
G.CH. On

Found out the correct way to do it :

?param1=#= value1 #&param2=#= value2#