Guest User

Untitled

a guest
Sep 21st, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.73 KB | None | 0 0
  1. @(Html.Kendo().Grid<trans.getTransaction>()
  2. .Name("TransactionsGrid")
  3. .Columns(columns =>
  4. {
  5. columns.Template(@<text></text>)
  6. .HeaderTemplate(@<text><input id="chkExpandAllRows" type="checkbox" title="Expand All Rows" onclick="expandAllRows()" /></text>).Width(30);
  7. columns.Bound(p => p.Name).Title("Name").ClientTemplate("#=Name#").Width(100);
  8. columns.Bound(p => p.Description).Title("Description").ClientTemplate("#=Description#").Width(200);
  9. columns.Bound(p => p.Notes).Title("Notes").ClientTemplate("#=Notes#").Width(200);
  10. columns.Bound(p => p.Type).Hidden();
  11. })
  12. .ClientDetailTemplateId("CommentdetailTemplate")
  13. .Pageable(pageable => pageable.Refresh(true))
  14. .Scrollable(s => s.Height("auto"))
  15. .Sortable()
  16. .DataSource(dataSource => dataSource
  17. .Ajax()
  18. .PageSize(12)
  19. .ServerOperation(true)
  20. .Read(read => read.Action("AjaxFetchTransactions", "trans", new { area = "service" }))
  21. )
  22. )
  23.  
  24. <script type="text/x-kendo-template" id="CommentdetailTemplate">
  25. @(Html.Kendo().Grid<trans.getTransactioncomment>()
  26. .Name("TransactionComment")
  27. .Columns(columns =>
  28. {
  29. columns.Bound(o => o.DATE).Title("Date").Width(100).Filterable(false);
  30. columns.Bound(o => o.Comment).Title("Comment").Width(400).Filterable(false);
  31. columns.Bound(o => o.STATUS).Title("Status").Width(100).Filterable(false);
  32. })
  33. .DataSource(dataSource => dataSource
  34. .Ajax()
  35. .Read(read => read.Action("AjaxGetTransactionComments", "trans", new { ID = "#=id#", type = "#=type#", area = "Services" }))
  36. )
  37. .Pageable()
  38. .Sortable()
  39. .Selectable()
  40. .ToClientTemplate()
  41. )
  42. </script>
Add Comment
Please, Sign In to add comment