Hybrid View

  1. #1
    Sencha User
    Join Date
    Dec 2008
    Location
    Manchester, UK
    Posts
    103
    Vote Rating
    8
    LisburnLad will become famous soon enough

      0  

    Default Row Body Feature No Longer Working With Buffered Stores

    Row Body Feature No Longer Working With Buffered Stores


    In 4.1 the Row Body Feature could be added to a grid using a buffered store. This now appears to be broken in the 4.2 Beta.

    Here's my test code:

    Code:
    <!DOCTYPE html />
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
      <title>Row Body Feature Test</title>  
         
      <link rel="stylesheet" type="text/css" href="Lib/ExtJS/resources/css/ext-all.css"/>
      <script type="text/javascript" src="Lib/ExtJS/ext-all-debug-w-comments.js"></script>   
    
    
      <script type="text/javascript">
        Ext.Loader.setConfig({ enabled: true })
    
    
        Ext.require([
          'Ext.grid.*',
          'Ext.data.*',
          'Ext.util.*'
        ]);
    
    
        Ext.application(
        {
          name: 'Test',
    
    
          launch: function ()
          {
            Ext.define('ReviewsModel',
            {
              extend: 'Ext.data.Model',
              fields: [{ name: 'summary', type: 'string' }]
            });
    
    
            var ReviewsStore = Ext.create('Ext.data.Store', 
            {
              model: 'ReviewsModel',
              autoLoad: true,
              buffered: true,
              pageSize: 10,
    
    
              proxy:
              {
                type: 'ajax',
                url: 'ReviewLoader.aspx',
                method: 'post',
                reader:
                {
                  type: 'json',
                  root: 'rows',
                  totalProperty: 'totalCount'
                }
              }
            });
    
    
            var reviewGrid = Ext.create('Ext.grid.Panel', 
            {
              width: 700,
              height: 500,
              store: ReviewsStore,
              loadMask: true,
              features: [{
                ftype: 'rowbody',
                getAdditionalData: function (data, rowIndex, record, orig)
                {
                  var headerCt = this.view.headerCt,
                      colspan = headerCt.getColumnCount();              
                  return {
                    rowBody: '<div style="padding: 1em">cheese</div>',
                    rowBodyCls: "my-body-class",
                    rowBodyColspan: colspan
                  };
                }
              }],
              columns: [{ header: "Title", dataIndex: 'summary', flex: 1 }]
            });
    
    
            Ext.create('Ext.container.Viewport',
            {
              layout: 'fit',
              items: reviewGrid
            });
          }
        });
      </script>
    
    
    </head>
    <body>
    </body>
    </html>
    In the ReviewLoader.aspx file I have it hardcoded to simply return the following JSON:

    Code:
    {'totalCount':'1','rows':[{'summary':'Some test content for the first line'}]}
    If the "buffered: true" attribute of the store is commented out, then everything starts working again.

  2. #2
    Sencha User
    Join Date
    Dec 2008
    Location
    Manchester, UK
    Posts
    103
    Vote Rating
    8
    LisburnLad will become famous soon enough

      0  

    Default


    I've just tried this again with the new 4.2 Beta2, and I'm afraid that the problem still exists.

    Steve

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar