1. #1
    Ext JS Premium Member
    Join Date
    Sep 2009
    Location
    Cypress, California
    Posts
    224
    Vote Rating
    83
    dougbieber is just really nice dougbieber is just really nice dougbieber is just really nice dougbieber is just really nice

      0  

    Default Fixed summary footer row on EditGridPanel

    Hi,

    I'd was wondering if there was a way to add a fixed footer to an EditorGridPanel? I want the footer to align with the header columns and and resize accordingly. I'm using extjs 3.0.2. Does this feature even exist in extjs? I noticed the GroupSummary class, however that is not a fixed row (i.e. non-scrolling). Thanks for your help.

    -Doug

  2. #2
    Ext JS Premium Member
    Join Date
    Sep 2009
    Location
    Cypress, California
    Posts
    224
    Vote Rating
    83
    dougbieber is just really nice dougbieber is just really nice dougbieber is just really nice dougbieber is just really nice

      0  

    Default

    Well I'm answering my own question. I basically do the following:

    var footerHTML = '<div...><tbody><tr><td id="foot_confirm"...><td...>...</div>'

    In the grid I construct it as follows:

    var myGrid = new Ext.grid.EditorGridPanel({
    id: 'myId',
    .
    .
    footer: true,
    footerCfg: {
    tag: 'hd',
    cls: 'x-grid3-footer',
    html: footerHTML
    }
    }
    var el = Ext.getCmp('myId');
    el.addListener('resize', manageResize);

    This function is needed if you have a stretchy grid that could be affected by a window resize. It will ensure that the footer is aligned with the header.

    function manageResize(
    var columnModel = dougsGrid.getColumnModel();
    var column = columnModel.getColumnById('head_confirm');
    var width = column.width;
    el = Ext.get('foot_confirm');
    el.setWidth(width);
    }