Results 1 to 5 of 5

Thread: No way to refresh Grid Summary after grid data is changed

    Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.
  1. #1
    Sencha User
    Join Date
    May 2014
    Posts
    5

    Default No way to refresh Grid Summary after grid data is changed

    Hi,
    I'm using a grid with "groupingsummary" feature in Ext JS 5. In this grid, I'm adding few records after which I reload my grid store. But after store is successfully reloaded, the summary row of grid is not reloaded for those previous/old records, while summary row looks fine for new records.
    Here is part of my code -

    Store for my Grid....
    Code:
    Ext.define('YagnaPS.store.bom.Products',{
       ....................
        groupField: 'rootPart',
         proxy: {
            type: 'ajax',
            url: '/api/pricingbom/get',
            extraParams:{
                bomId:''
            },
            reader:{
                type: 'json',
                rootProperty:"pricingBomList"
            }
        }
    ..................
    });
    Here is grid -

    Code:
    Ext.define('YagnaPS.view.bom.BoMGrid',{
        extend: 'Ext.grid.Panel',
     ................................
        features : [
            {
                ftype : 'groupingsummary',
                groupHeaderTpl:'{name}',
                startCollapsed: true,
                hideGroupedHeader:true
            }
        ],
        columns:[
            {
                text: 'Product',
                dataIndex: 'pricingPartName',
                align:'left',
                renderer:  function(value, metaData, record, rowIndex, colIndex) {
                    ...............................
                },
                summaryType : function(records){
                    if(records[0].get('partNumber') == null)
                        return '-';
                    var rootPartName = records[0].get('rootPart');
                    return Ext.String.format(rootPartName);
                },
                summaryRenderer: function(value, summaryData, dataIndex) {
                    return Ext.String.format('{0}',value);
                },
                flex:4
            },
    Here are few snapshots before and after grid store is loaded with new records...

    1. Before adding new record
    BeforeAddition.jpg

    2. After adding new record (Highlighted record is added)

    After Addition.jpg


    Till Ext JS 4.x , there was a method to refresh Grid summary as below :

    Code:
    grid.getView().getFeature(0).refresh();
    But in Ext JS 5.0 , I cant find any method to refresh the summary.

    Please help. If any work around is present, please let me know.

    Thanks.

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,449

    Default

    Bugs reports require a runnable test case. One way to provide a test case is with Sencha Fiddle.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Fullstack Engineer
    ________________
    Modus Create is based on the model of an open source team. We’re a remote, global team of experts in our field. To find out more about the work we do, head over to our website.

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Oct 2007
    Posts
    52

    Default

    I also experience this... i have a grid loaded with data from remote server....
    after refreshing the data ( via refresh button or paging ), the summary is not updated to reflect the new data retrieved,
    it would instead show 0.

    thanks

  4. #4
    Sencha User
    Join Date
    Jul 2014
    Posts
    1

    Default

    The same problem ! Even if you simply reload your storage, the summary data would be incorrect...So, the summary is not updated.
    https://fiddle.sencha.com/#fiddle/84u

    Just press Load button for reloading storage.

  5. #5
    Sencha User
    Join Date
    Jul 2014
    Location
    grenoble
    Posts
    7

    Default

    bug reported there : http://www.sencha.com/forum/showthre...n-store-reload still waiting for a fix...

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
  •