Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Ext.define('PF.view.tradeReview.Stocks', {
- extend: 'Ext.grid.Panel',
- title: 'Stocks',
- alias: 'widget.tradeReview.Stocks',
- // Show all columns within grid.
- forceFit: true,
- controller: 'TradeReview',
- dockedItems: [{
- xtype: 'pagingtoolbar',
- store: 'TradeReviewTradeType', // same store GridPanel is using
- dock: 'bottom',
- itemId: 'ptoolbar',
- displayInfo: true
- }],
- initComponent: function () {
- this.columns = [{
- header: 'Order Number',
- dataIndex: 'orderNumber',
- width: 200
- }, {
- header: 'Transaction Status',
- dataIndex: 'transactionstatus',
- width: 200
- }, {
- header: 'Trade Date',
- dataIndex: 'tradeDate',
- width: 200
- }, {
- header: 'Settlement Date',
- dataIndex: 'settlementDate',
- width: 200
- }, {
- header: 'Broker',
- dataIndex: 'tradeBroker',
- width: 200
- }, {
- header: 'Transaction Type',
- dataIndex: 'transactionTypeID',
- width: 200
- }, {
- header: 'Security',
- dataIndex: 'securityID',
- width: 200
- }, {
- header: 'Price',
- dataIndex: 'price',
- width: 200
- }, {
- header: 'Quantity',
- dataIndex: 'quantity',
- width: 200
- }, {
- header: 'Commission',
- dataIndex: 'commission',
- width: 200
- }, {
- header: 'Gross',
- dataIndex: 'gross',
- width: 200
- }, {
- header: 'Currency Code',
- dataIndex: 'currencyCode',
- width: 200
- }, {
- header: 'Account Number',
- dataIndex: 'accountNumber',
- width: 200
- }, {
- header: 'Comments',
- dataIndex: 'comments',
- width: 200
- }];
- // Assign store for this view
- this.store = this.loadData();
- PF.view.tradeReview.Stocks.superclass.initComponent.call(this);
- },
- loadData: function () {
- return Ext.StoreMgr.get('TradeReviewTradeType');
- },
- // Load store only when this grid panel renders.
- listeners: {
- render: function (object, options) {
- // this.store.clearFilter(true);
- // this.store.proxy.customFilter = this.getRecordFilter();
- //this.store.load({ params: { start: 0, limit: 10} });
- this.store.load();
- // var pToolbar = this.down('#pToolbar');
- // pToolbar.store = Ext.StoreMgr.get('TradeReviewTradeType');
- }
- }
- });
Add Comment
Please, Sign In to add comment