Results 1 to 3 of 3

Thread: How to extend 'Ext.grid.feature.Summary'?

  1. #1
    Sencha User
    Join Date
    Jul 2008
    Posts
    9

    Default How to extend 'Ext.grid.feature.Summary'?

    my code:
    Code:
      Ext.define('Mytest', {
        extend: 'Ext.grid.feature.Summary',
        alias: 'feature.my'
      });
    
    Ext.define('MyGrid', {
        extend: 'Ext.grid.Panel',
        title: 'title',
        store: myStore,
        renderTo: Ext.getBody(),
    
        features: [{
          ftype: 'my' //'summary' works as expected
        }],
    
    
        columns: [
          {
            dataIndex: 'id',
            text: 'id',
            summaryRenderer: function() {return 'test str'}
          },
          {dataIndex: 'name', text: 'name'},
          {
            dataIndex: 'value',
            text: 'value',
            summaryType: 'sum'
          }
        ]
    });
    
    Ext.create('MyGrid');
    grid empty,
    firebug show "TypeError: this.getNodeContainer(...) is null"
    at ext-4.2.1.883/ext-all-debug-w-comments.js (line 149003)

    Code:
            // Note that these may be wrapping rows which *contain* rows which map to records       
    
            collectNodes: function(targetEl) { 
    
    line 149003      this.all.fill(this.getNodeContainer().childNodes, this.all.startIndex); 
    
          },
    var my = Ext.create('Mytest');
    ...
    features: [my], //same result

    subj?
    tnx.

  2. #2
    Sencha User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364
    Answers
    102

    Default

    i'm looking into this. But... you should NEVER ever ever ever put renderTo in a prototype for a class.

  3. #3
    Sencha User
    Join Date
    Jul 2008
    Posts
    9

    Default

    Prent class working as expected: ftype: 'summary'

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •