column filterable itemTemplate via kendo.template?

4 posts, 1 answers
  1. Ed
    Ed avatar
    168 posts
    Member since:
    Sep 2013

    Posted 10 Feb 2016 Link to this post

    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

  2. Plamen
    Admin
    Plamen avatar
    3079 posts

    Posted 11 Feb 2016 Link to this post

    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!
     
  3. Ed
    Ed avatar
    168 posts
    Member since:
    Sep 2013

    Posted 11 Feb 2016 in reply to Plamen Link to this post

    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

  4. Answer
    Plamen
    Admin
    Plamen avatar
    3079 posts

    Posted 12 Feb 2016 Link to this post

    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!
     
Back to Top