or
@(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.});highlightRow: function (listView, field, value) { setTimeout(function () { var items = listView.items(); for (var i = 0; i < items.length; i++) { var ele = $(items[i]); var uid = ele.data('uid'); if (pev.isGoodString(uid)) { var item = listView.dataSource.getByUid(uid); if (item != null && typeof item != 'undefined' && item[field] == value) { ele.find('.list-item').highlight(); } } } }, 500); }jQuery.fn.highlight = function () { $(this).each(function () { var el = $(this); el.before("<div/>") el.prev() .width(el.width()) .height(el.height()) .css({ "position": "absolute", "background-color": "#ffff99", "opacity": ".7" }) .fadeOut(3000); }); }
