This is a migrated thread and some comments may be shown as answers.

js (template) logic for field

1 Answer 81 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Phil
Top achievements
Rank 1
Phil asked on 24 Nov 2012, 03:58 PM
var products = [{"id": "12345"}]

is there anyway to attach some logic to that and replace that with a product name in the template?

eg. (if id = 12345) { template: <span>Some Product Name</span>} else { template: <span>#= id #</span>}


1 Answer, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 26 Nov 2012, 07:49 AM
Hello Phil,

You can execute arbitrary JavaScript inside the template.
More details here: http://docs.kendoui.com/getting-started/framework/templates/overview

Regards,
Nikolay Rusev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Phil
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Share this question
or