Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

Hybrid View

  1. #1
    Ext JS Premium Member
    Join Date
    Apr 2008
    Location
    Oslo
    Posts
    64
    Answers
    2
    Vote Rating
    0
    mikhailt is on a distinguished road

      0  

    Question Answered: How to combine XTemplate and custom renderer? in RowExpander

    Answered: How to combine XTemplate and custom renderer? in RowExpander


    I use RowExpander plugin with a template.
    How to use renderer function in the template?
    Code:
    REDrenderer = function(nValue) 
    {
        var retValue = nValue;
        if (nValue < threshold)
        {
            retValue = "<font style='color:red;'>" + nValue.toString() + "</font>";        
        }  
        return retValue;
    };
    
    
       Ext.create('Ext.grid.Panel', {
                store: mystore,
                columns: [
                    {
                        header     : 'AAA',
                        dataIndex: 'aaa1',
                        renderer: REDrenderer 
                    }
                ],
    
                plugins: [
                    {
                        ptype: 'rowexpander',
                        rowBodyTpl : [ '<div>{aaa1}</div>' ] //NEED to call REDrenderer() here!
                    }
                ]
            });
    I want to see value red in expanded template using defined renderer.

  2. Try:

    Code:
    // sorry, just prefer not to declare global functions if I can avoid it!
    var app = {};
    app.REDrenderer = function(nValue) 
                          {
                              var retValue = nValue;
                              if (nValue < threshold)
                              {
                                  retValue = "<font style='color:red;'>" + nValue.toString() + "</font>";        
                              }  
                              return retValue;
                          };    
    
    
    
    
    Ext.create('Ext.grid.Panel', {
            store: mystore,
            columns: [
                {
                    header     : 'AAA',
                    dataIndex: 'aaa1',
                    renderer: app.REDrenderer 
                }
            ],
    
    
            plugins: [
                {
                    ptype: 'rowexpander',
                    rowBodyTpl :  '<div>{[app.REDrenderer(values.aaa1);]}</div>'
                }
            ]
        });

    stevil

  3. #2
    Ext JS Premium Member stevil's Avatar
    Join Date
    Nov 2007
    Location
    Denver, CO
    Posts
    1,045
    Answers
    15
    Vote Rating
    9
    stevil will become famous soon enough

      0  

    Default


    Try:

    Code:
    // sorry, just prefer not to declare global functions if I can avoid it!
    var app = {};
    app.REDrenderer = function(nValue) 
                          {
                              var retValue = nValue;
                              if (nValue < threshold)
                              {
                                  retValue = "<font style='color:red;'>" + nValue.toString() + "</font>";        
                              }  
                              return retValue;
                          };    
    
    
    
    
    Ext.create('Ext.grid.Panel', {
            store: mystore,
            columns: [
                {
                    header     : 'AAA',
                    dataIndex: 'aaa1',
                    renderer: app.REDrenderer 
                }
            ],
    
    
            plugins: [
                {
                    ptype: 'rowexpander',
                    rowBodyTpl :  '<div>{[app.REDrenderer(values.aaa1);]}</div>'
                }
            ]
        });

    stevil

Thread Participants: 1