9

I have this dojo:

I am trying to pass additional parameter to template via:

  detailTemplate: kendo.template($("#detail-template").html())({someParam: 'someValue'}) 

However when I do this, I can't no more use variables coming from data source. When I uncomment those variables it gives error(see console output)

   <div>
    Name: #: /*name*/ #
  </div>
  <div>
    Age: #: /*age*/ #
  </div> 

How can I use both datasource variables and external variable in kendo template?

asdf_enel_hak
  • 7,474
  • 5
  • 42
  • 84

1 Answers1

11
detailTemplate: function(dataItem){ 
    dataItem.someParam = 'someValue';
    return kendo.template($("#detailTemplate").html())(dataItem);
}

dojo: http://dojo.telerik.com/OvASO

Gene R
  • 3,684
  • 2
  • 17
  • 27