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

column filterable itemTemplate via kendo.template?

3 Answers 430 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ed
Top achievements
Rank 1
Ed asked on 10 Feb 2016, 05:56 PM

Using the column filter itemTemplate, I can use this to specify the item template inline (using #=data.country# and e.field). How can I achieve the same using kendo.template?

http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#configuration-columns.filterable.itemTemplate

Thanks,

--Ed

3 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 11 Feb 2016, 07:18 AM
Hi,

The kendo.template is actually used by the itemTemplate internally from the code and the function is passed to it so it is not quite clear what are you trying to achieve. Would you please elaborate a little bit so we could be more helpful?

Regards,
Plamen
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Ed
Top achievements
Rank 1
answered on 11 Feb 2016, 03:52 PM

Hi Plamen,

What I'd like to do is have a template in a script tag (in my html output) and then specify that template in the configuration options for columns.filterable.itemTemplate in the same way the following is done:

var actionTemplate = kendo.template($("#action-template").html());

and then specify actionTemplate on the grid options for column.template, like the example given in the Grid API docs:

http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#configuration-columns.template

An example that produces the same result as the example given in the Grid API docs would be appreciated:

http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#configuration-columns.filterable.itemTemplate

Thanks,

--Ed

0
Accepted
Plamen
Telerik team
answered on 12 Feb 2016, 08:54 AM
Hi Ed,

Thank you for elaborating the question. Unfortunately it seems that  have a template in a script tag can not be used in the described scenario.

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