-
Sencha User
reconfiguring plugins after grid reconfigure in gridpanel
I need to reconfigure summary plugin after grid reconfigure. Can anyone let me know how to do the reconfiguring of summary plugin after grid reconfigure
below is the reconfig code.
var GRIDCM = new Ext.grid.ColumnModel({
defaults: {
width: 120,
sortable: true
},
columns: [{dataIndex: 'start_date',header: 'Start Date',width: 100, align: 'left', tp:'string',renderer:Ext.util.Format.dateRenderer('m/d/Y')},
{dataIndex: 'end_date',header: 'End Date',width: 100, align: 'left', tp:'string',renderer:Ext.util.Format.dateRenderer('m/d/Y')},
{dataIndex: 'Status',header: 'Status',width: 100, align: 'left', tp:'string'},
{dataIndex: 'eom_booked',header: 'EOM Booked',width: 100,align: 'right', renderer: usMoneyWODecimalNFT, tp:'decimal',summaryType: 'sum'},
{dataIndex: 'mtd_ama',header: 'MTD AMA',width: 100,align: 'right', renderer: usMoneyWODecimalNFT, tp:'decimal',summaryType: 'sum'},]
});
this.NFTGrid.reconfigure(this.NFTGridStore, GRIDCM);
====
Thanks & Regards
Hari
-
Sencha User
Hi All,
I solved this. Here is the solution
this.NFTGrid.plugins[0].cm = GridCM; - If without this below line calls it will give error. So first assign new no. of columns to column model.
this.NFTGrid.reconfigure(this.NFTGridStore, GridCM); - Now reconfigure.
this.NFTGrid.plugins[0].init(this.NFTGrid); - Now call the plugin constructor.
=====
Thanks & Regards
Hari
-
Sencha User
Solved
Hi All,
I solved this. Here is the solution.
this.NFTGrid.plugins[0].cm = GridCM; - In this I am giving new column model to the grid so that it won't give any error. When we do the reconfig.
this.NFTGrid.reconfigure(this.NFTGridStore,GridCM); - Reconfig with new column model and store
this.NFTGrid.plugins[0].init(this.NFTGrid); - calling plugin constructor. So that it will work fine.
I used this for summary plugin.
=====
Thanks & Regards
Hari
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules