or
<script id='newButton-template' type='text/x-kendo-template'> <button class='k-button' data-bind='click: newProduct'><span class='k-icon k-i-plus'></span> New</button></script><div id='newProdView'></div><script type="text/javascript"> var newProdViewModel = kendo.observable({ newProduct: function (vm) { // vm is the view model alert(vm.target.innerText); } }); var newTemplate = new kendo.View('newButton-template'); newTemplate.render("#newProdView", newProdViewModel);</script>columns.Template(c => @Ajax.ActionLink(c.UserName.ToString(), "GetPerson", "Home", null, new AjaxOptions { UpdateTargetId = "result" }, null)).Title("Index") .ClientTemplate("<a href='/Admin/Admin/GetUserRoles/#=UserName#'>#=UserName#</a>");01.settingOptions: {02. tools: [03. "bold",04. "italic",05. "underline",06. "strikethrough",07. "justifyLeft",08. "justifyCenter",09. "justifyRight",10. "justifyFull",11. "insertUnorderedList",12. "insertOrderedList",13. "indent",14. "outdent",15. "createLink",16. "unlink",17. "insertImage",18. "subscript",19. "superscript",20. "createTable",21. "addRowAbove",22. "addRowBelow",23. "addColumnLeft",24. "addColumnRight",25. "deleteRow",26. "deleteColumn",27. "viewHtml",28. "formatting",29. "fontName",30. "fontSize",31. "foreColor",32. "backColor"33. ],34. imageBrowser: {35. messages: {36. dropFilesHere: "Drop files here"37. },38. schema: {39. data: function(response){40. //alert(response.toSource());41. return response.data;42. },43. total: 'total',44. //model: settingObj.model45. },46. //path: "<?php echo $this->preferences_data['file_path_articles_image']; ?>",47. transport: {48. read: {49. type: "POST",50. dataType: "json",51. url: "<?php echo $this->url( array('module' => 'Portfolio','controller' => 'frontend', 'action' => 'grid' ), 'adminrout', true) ?>",52. data: {53. preferences_table : true,54. table_name : "articles_preferences",55. primary_id_field : "id",56. primary_id_field_value : "1",57. primary_file_field : "",58. file_content : "",59. file_path_field : "file_path_articles_image",60. file_path_articles_image : "<?php echo $this->preferences_data['file_path_articles_image']; ?>",61. file_extension_field : "file_type",62. file_max_size_field : "file_size_max"63. }64. },65. destroy: {66. url: "/kendo-ui/service/ImageBrowser/Destroy",67. type: "POST"68. },69. create: {70. url: "/kendo-ui/service/ImageBrowser/Create",71. type: "POST"72. },73. 74.thumbnailUrl: "<?php echo $this->serverUrl().$this->baseUrl().'/'.$this->preferences_data['file_path_articles_image']; ?>",
<script id="plan_client_template" type="text/kendo-tmpl"> @(Html.Kendo().Grid<Rep.Models.BuildingChangeValidationViewModel>() .Name("CVGrid") .Scrollable() .Selectable() .Editable(editable => editable.Mode(GridEditMode.InLine)) .Columns(columns => { columns.Bound(b => b.Field); columns.Bound(b => b.BuildingChangeValidationStatusType).ClientTemplate("#=BuildingChangeValidationStatusType.Value#").Width(250); columns.Command(command => command.Custom("Update").Click("updateValidation")); columns.Command(command => { command.Edit(); }).Width(172); }) .DataSource(dataSource => dataSource .Ajax() .Model(model => { model.Id(b => b.BuildingId); model.Field(b => b.BuildingChangeValidationStatusType).DefaultValue( ViewData["defaultBuildingChangeValidationStatuses"] as Rep.Common.LookupItem); }) .PageSize(5) .Read(read => read.Action("BuildingValidations_Read", "Plan", new { buildingId = 0 })) .Update(update => update.Action("BuildingValidations_Update", "Plan")) ) .ToClientTemplate() )
</script>