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

Listview not filling

1 Answer 59 Views
Templates
This is a migrated thread and some comments may be shown as answers.
Alan
Top achievements
Rank 1
Alan asked on 19 Jul 2012, 11:14 AM
I have a listview that was filling fine until I changed the template to include and <a href="jj"> tag. If I remove the href the listview fills. Is this a bug or is there a workaround?

Sample Code:

The following works and fills the listview as expected:

<script id="department_template" type="text/x-kendo-tmpl">
    <li><a onclick="GetCategoriesFor('${Value}')">${Value}</a></li>
</script>

If however I add an href (this is the ONLY change made in the page) it fails to fill the listview

<script id="department_template" type="text/x-kendo-tmpl">
    <li><a href="#categories" onclick="GetCategoriesFor('${Value}')">${Value}</a></li>
</script>


1 Answer, 1 is accepted

Sort by
0
Alan
Top achievements
Rank 1
answered on 20 Jul 2012, 11:27 AM
I found the issue with this.....All that was required was to "escape" the # tag

<script id="department_template" type="text/x-kendo-tmpl">
    <li><a href="\#categories" onclick="GetCategoriesFor('${Value}')">${Value}</a></li>
</script>
Tags
Templates
Asked by
Alan
Top achievements
Rank 1
Answers by
Alan
Top achievements
Rank 1
Share this question
or