or
Hi,<br><br>I run into a problem with the sample code below and I am not sure what causes it. The problem is that the "temperatureLabel" gets display only once inside the for loop in the "myTemplate" template. <br><br><br>var viewModel = kendo.observable({temperatureLabel: "Temperature", mydata:[]});<br><font style="line-height: 1.65;">$.ajax({</font><br> url: url,<br> context: this,<br> type: "GET",<br> success: function(data) {<br> this.viewModel.set("mydata", data);<br> kendo.bind($("#view"), viewModel, kendo.mobile.ui); <br> },<br> error: function(xhr, statusText, errorThrown) {<br> console.log(errorThrown);<br> },<br> timeout: 10000<br> });<br><br><div id="view"><br><ul id="taf-panelbar" data-bind="source: mydata" data-template="myTemplate"></ul><br></div><br><br><script id="myTemplate" type="text/x-kendo-template"><br> # for (var i = 0; i < forecast.length; i++) { #<br> <li><br> <div><br> <table style="border: 1px solid lightGray; border-radius:6px;"><br> <tr><br> <td class="label"><span data-bind="text:temperatureLabel></span></td><br> <td>:</td><br> <td style="text-align:left;"><span>#=forecast[i].temperature#</span></td><br> </tr> <br> </table><br> </div><br> </li><br> # }#<br></script><br><br>Can someone shed some lights on this?<br><br>Thanks,<br>Kee@(Html.Kendo().Grid(Model.Items as IEnumerable<Transaction>) .Name("KendoCrGrid") .Columns(columns => { columns.Bound(e => e.TradeDate).Title("Trade Date").Format("{0:MM/dd/yyyy}"); columns.Bound(e => e.SettlementDate).Title("Settlement Date").Format("{0:MM/dd/yyyy}"); columns.Bound(e => e.Activity).Title("Activity"); columns.Bound(e => e.Description).Title("Security Name"); columns.Bound(e => e.Symbol).Title("Symbol"); }) .Sortable() .Pageable() .DataSource(d => d .Ajax() .PageSize(20) .ServerOperation(false) ))<div class="row-fluid"> <span class="span3"> <input type="checkbox" value="abc" />abc </span> <span class="span3"> <input type="checkbox" value="def" />def </span> <span class="span3"> <input type="checkbox" value="hij" />hij </span></div><div class="row-fluid" id="button-bar"> <button>Submit</button></div>var validator = $('.row-fluid').kendoValidator().data('kendoValidator');$('#button-bar').on('click', 'button', function(e) { if (!validator.validate()) { alert("Failed"); return; } alert("Passed");});My Kendo Grid is not displaying any of the data. I am trying to pull down JSON from a web method in an aspx page. I keep getting the never ending spinner. I am new to using these controls and am banging my head against my desk for a day now.
01.$('#grid').kendoGrid({02. columns: [03. {04. field: "ClientName",05. title: "ClientName"06. 07. }],08. dataSource: {09. type: 'json',10. serverPaging: true,11. schema: {12. data: 'd'13. },14. transport: {15. read: function (options) {16. $.ajax({17. type: 'POST',18. url: 'Service/GetGridInformation',19. dataType: 'json',20. data: '',21. contentType: 'application/json; charset=utf-8',22. serverPaging: true,23. success: function (msg) {24. options.success(msg.d);25. }26. });27. }28. 29. }30. },31. height: 200,32. pageSize: 1033. 34. 35.});