Guest User

Untitled

a guest
Oct 16th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.78 KB | None | 0 0
  1. Ext.define('PF.view.tradeReview.Stocks', {
  2. extend: 'Ext.grid.Panel',
  3. title: 'Stocks',
  4. alias: 'widget.tradeReview.Stocks',
  5. // Show all columns within grid.
  6. forceFit: true,
  7. controller: 'TradeReview',
  8. dockedItems: [{
  9. xtype: 'pagingtoolbar',
  10. store: 'TradeReviewTradeType', // same store GridPanel is using
  11. dock: 'bottom',
  12. itemId: 'ptoolbar',
  13. displayInfo: true
  14. }],
  15. initComponent: function () {
  16. this.columns = [{
  17. header: 'Order Number',
  18. dataIndex: 'orderNumber',
  19. width: 200
  20. }, {
  21. header: 'Transaction Status',
  22. dataIndex: 'transactionstatus',
  23. width: 200
  24. }, {
  25. header: 'Trade Date',
  26. dataIndex: 'tradeDate',
  27. width: 200
  28. }, {
  29. header: 'Settlement Date',
  30. dataIndex: 'settlementDate',
  31. width: 200
  32. }, {
  33. header: 'Broker',
  34. dataIndex: 'tradeBroker',
  35. width: 200
  36. }, {
  37. header: 'Transaction Type',
  38. dataIndex: 'transactionTypeID',
  39. width: 200
  40. }, {
  41. header: 'Security',
  42. dataIndex: 'securityID',
  43. width: 200
  44. }, {
  45. header: 'Price',
  46. dataIndex: 'price',
  47. width: 200
  48. }, {
  49. header: 'Quantity',
  50. dataIndex: 'quantity',
  51. width: 200
  52. }, {
  53. header: 'Commission',
  54. dataIndex: 'commission',
  55. width: 200
  56. }, {
  57. header: 'Gross',
  58. dataIndex: 'gross',
  59. width: 200
  60. }, {
  61. header: 'Currency Code',
  62. dataIndex: 'currencyCode',
  63. width: 200
  64. }, {
  65. header: 'Account Number',
  66. dataIndex: 'accountNumber',
  67. width: 200
  68. }, {
  69. header: 'Comments',
  70. dataIndex: 'comments',
  71. width: 200
  72. }];
  73. // Assign store for this view
  74. this.store = this.loadData();
  75. PF.view.tradeReview.Stocks.superclass.initComponent.call(this);
  76. },
  77. loadData: function () {
  78. return Ext.StoreMgr.get('TradeReviewTradeType');
  79.  
  80. },
  81. // Load store only when this grid panel renders.
  82. listeners: {
  83. render: function (object, options) {
  84. // this.store.clearFilter(true);
  85. // this.store.proxy.customFilter = this.getRecordFilter();
  86. //this.store.load({ params: { start: 0, limit: 10} });
  87. this.store.load();
  88. // var pToolbar = this.down('#pToolbar');
  89. // pToolbar.store = Ext.StoreMgr.get('TradeReviewTradeType');
  90. }
  91. }
  92. });
Add Comment
Please, Sign In to add comment