Use pre-compiled template along with MVVM

2 posts, 0 answers
  1. Pavel
    Pavel avatar
    15 posts
    Member since:
    May 2012

    Posted 08 Nov 2015 Link to this post

    Hi
    I have a view model with some repeating properties that I need to render using the same template.
    I specified the template, and bound the viewModel properties using source binding and data-template attribute.

    It works well, but according to the kendoUI documentation, pre-compiling and reusing of the template makes sense when it should be rendered several times.

    Is there any way to use the advantage of pre-compiled templates along with mvvm (For example, data-template attribute could accept not only the id of the template DOM element, but also model's function name)?
    Thanks!
  2. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 11 Nov 2015 Link to this post

    Hello Pavel,

    The data-template attribute should point to the ID of a script element, as mentioned in the source binding documentation. That being said, using compiled templates along with MVVM is not supported.

    Regards,
    Alexander Popov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
Back to Top