Guest User

Untitled

a guest
Dec 18th, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. <template>
  2. <JqxGrid :width="width" :source="dataAdapter" :columns="gridValues"
  3. :pageable="true" :autoheight="true" :sortable="true"
  4. :altrows="true" :enabletooltip="true" :editable="true"
  5. :selectionmode="'multiplecellsadvanced'" :showtoolbar="true" :rendertoolbar="rendertoolbar">
  6. </JqxGrid>
  7. </template>
  8.  
  9. <script>
  10.  
  11. import JqxGrid from "../jqx-vue/vue_jqxgrid.vue";
  12. import Button from "./buttonComponent.vue";
  13.  
  14. methods: {
  15. rendertoolbar: function (toolbar) {
  16. // this is where I am trying to add the other component but it is not rendering as a actual component, it is just spitting out as it is.
  17. toolbar.append($("<span style='margin: 5px;'> <jqx-button class='custom-erp-button custom-btn-secondary' :button-name="+`Add`+"></jqx-button> </span>"));
  18. },
  19. cellsrenderer: function (row, columnsfield, value, defaulthtml, columnproperties, rowdata) {
  20. if (value < 20) {
  21. return '<span style="margin: 4px; float: ' + columnproperties.cellsalign + '; color: #ff0000;">' + value + '</span>';
  22. }
  23. else {
  24. return '<span style="margin: 4px; float: ' + columnproperties.cellsalign + '; color: #008000;">' + value + '</span>';
  25. }
  26. }
  27. }
  28. </script>
  29.  
  30. <style>
  31. </style>
Add Comment
Please, Sign In to add comment