or
Hi ,
I have a List View which I would like to show on the notification widget using a template.
The notification widget template does not seem to support MVVM binding.
Have attached a sample code showing
List View being displayed bound to a template using MVVM
Notification widget being shown binding a simple text
Notification widget being shown using the List Template ( This Fails)
Please see attached file for code
Regards
Balachander
01.<script>02. $(document).ready(function () {03. var crudServiceBaseUrl = "http://demos.telerik.com/kendo-ui/service",04. dataSource = new kendo.data.DataSource({05. transport: {06. read: function (options) {07. $.ajax({08. type: 'GET',10. dataType: "json",11. success: function (result) {12. options.success(result);13. }14. });15. },16. update: function (e) {alert(this.data);options.success();17. },18. destroy: {19. url: crudServiceBaseUrl + "/Products/Destroy",20. dataType: "jsonp"21. },22. create: {23. url: crudServiceBaseUrl + "/Products/Create",24. dataType: "jsonp"25. },26. parameterMap: function(options, operation) {27. if (operation !== "read" && options.models) {28. return {models: kendo.stringify(options.models)};29. }30. }31. },32. batch: true,33. pageSize: 20,34. schema: {35. model: {36. id: "ProductID",37. fields: {38. ProductID: { editable: false, nullable: true },39. ProductName: { validation: { required: true } },40. UnitPrice: { type: "number", validation: { required: true, min: 1} },41. Discontinued: { type: "boolean" },42. UnitsInStock: { type: "number", validation: { min: 0, required: true } }43. }44. }45. }46. });47. 48. $("#grid").kendoGrid({49. dataSource: dataSource,50. pageable: true,51. height: 550,52. toolbar: ["create"],53. columns: [54. { field:"ProductName", title: "Product Name" },55. { field: "UnitPrice", title:"Unit Price", format: "{0:c}", width: "120px" },56. { field: "UnitsInStock", title:"Units In Stock", width: "120px" },57. { field: "Discontinued", width: "120px" },58. { command: ["edit", "destroy"], title: " ", width: "200px" }],59. editable: "popup"60. });61. });62. </script>