Hello !
i'm currently trying to use the template system with data binding from a json local file but i've got a preblem to make it work.
here is my json code which is into a data.json local file:
here is my javascript code
here is my template
and here is the div where the html is added:
if someone could help me out to solve that problem ... ;)
thanks you ! :)
i'm currently trying to use the template system with data binding from a json local file but i've got a preblem to make it work.
here is my json code which is into a data.json local file:
[{ "Nom": "Test", "Pays": "FR", "Adresse1": "Rue du test", "CP": "59000" }]var dataSource = new kendo.data.DataSource({ transport: { read: { url: "./data.json", dataType: "json" }, }});$("#PointRelaisList").kendoMobileListView({ dataSource: dataSource, template: $("#PointRelaisListTemplate").text()});<script id="PointRelaisListTemplate" type="text/x-kendo-template"> <span class="PointRelaisImage" style="background-image: url('http://www.mondialrelay.fr/img/dynamique/pr.aspx?id=#: Pays ##: kendo.toString(ID, '0000000') #')" ></span><div class="PR-Name">#: Nom #<span class="value">(0.2 km)<a class="button" data-role="button" href="\#DetailPointRelais?Id=#: Pays ##: kendo.toString(ID, '0000000') #&Nom=#: Nom #" data-icon="info" style="font-size:10px;background-color:\#7184a2"></a><a class="button" data-role="button" data-context="#:ID#" data-click="setFavorite" data-icon="toprated" style="font-size:10px;background-color:\#7184a2"></a></span></div><div class="PR-Adress"> #: Adresse1 #<br/> #: Pays # - #: CP # #: Ville #</div></script><div data-role="scroller" class="scroller-content" > <ul data-role="listview" data-style="inset" class="MRW-Results" id="PointRelaisList" data-template="PointRelaisListTemplate"> </ul></div>thanks you ! :)