Results 1 to 5 of 5

Thread: renderer Grid never called

  1. #1

    Default renderer Grid never called

    Hello,

    I have a problem on version 4.0.2a extsjs. When I want applicaquer formatting of my columns of grids, I wanted to use "renderer" but he never called.

    I even try with your example, nothing is happening. Emitting breakpoints I realized that it is never called.

    Here's how I Usage requirements:

    Code:
    {
     xtype: 'numbercolumn'
     header: 'Critical'
     sortable: true,
     width: 70,
     format: '0 ',
     renderer: function (value) {
     if (value == null) {
     return'';
     }
     return value;
     }
     dataIndex: 'thCritical'
     }
    Best Regards
    kevin


  2. #2
    Ext JS Premium Member
    Join Date
    Nov 2007
    Location
    Denver, CO
    Posts
    1,045

    Default

    Not sure, but it seems like you would need a comma after the } that terminates your renderer, immediately before dataIndex? Your browser could be having a problem with that?

    If that fails, take off the xtype (go for the absolute simplest configuration and work your way back up) and see if anything changes.

    stevil

  3. #3

    Default

    Thank you for your answer,
    I tested on several browsers (Firefox, Chrome, IE8) the result is the same.
    I tried different statement as requested. I am almost convinced that there is no call to the function (the breakpoints are not even considered). However I made ??the statement the easiest and I realized that I still 0.
    What I have a problem I can not differentiate a field not filled in a field equal to 0.
    Here is my return flows:
    Code:
    {"type":"rpc","tid":4,"action":"searchagent","method":"searchsonde","result":{"metaData":{"totalProperty":"total","root":"records","id":"id","fields":[{"type":"int","name":"id_fsld"},{"type":"string","name":"uh"},{"type":"string","name":"st"},{"type":"string","name":"sst"},{"type":"string","name":"name"},{"type":"int","name":"thCritical"},{"type":"int","name":"nbThCritical"},{"type":"int","name":"thWarning"},{"type":"int","name":"nbThWarning"},{"type":"int","name":"deltaCritical"},{"type":"int","name":"deltaWarning"},{"type":"string","name":"stopStart"}]},"records":[{"id_fsld":"97","uh":"BT1SSST8","st":null,"sst":"basebdc02","name":"\/u105","thCritical":null,"nbThCritical":null,"thWarning":"98","nbThWarning":null,"deltaCritical":null,"deltaWarning":null,"stopStart":"\/oracle\/bt\/cron\/supervision_standby_BDC02"},{"id_fsld":"95","uh":"BT1SSST8","st":null,"sst":"basebdc02","name":"\/u103","thCritical":null,"nbThCritical":null,"thWarning":"98","nbThWarning":null,"deltaCritical":null,"deltaWarning":null,"stopStart":"\/oracle\/bt\/cron\/supervision_standby_BDC02"},{"id_fsld":"94","uh":"BT1SSST8","st":null,"sst":"basebdc02","name":"\/u102","thCritical":"90","nbThCritical":null,"thWarning":null,"nbThWarning":null,"deltaCritical":null,"deltaWarning":null,"stopStart":"\/oracle\/bt\/cron\/supervision_standby_BDC02"},{"id_fsld":"96","uh":"BT1SSST8","st":null,"sst":"basebdc02","name":"\/u104","thCritical":null,"nbThCritical":null,"thWarning":"98","nbThWarning":null,"deltaCritical":null,"deltaWarning":null,"stopStart":"\/oracle\/bt\/cron\/supervision_standby_BDC02"},{"id_fsld":"93","uh":"BT1SSST8","st":null,"sst":"fmk","name":"\/u01","thCritical":"98","nbThCritical":null,"thWarning":"97","nbThWarning":null,"deltaCritical":null,"deltaWarning":null,"stopStart":null},{"id_fsld":"92","uh":"BT1SSST8","st":null,"sst":"fmk","name":"\/c101","thCritical":"98","nbThCritical":null,"thWarning":"97","nbThWarning":null,"deltaCritical":null,"deltaWarning":null,"stopStart":null},{"id_fsld":"91","uh":"BT1SSST8","st":null,"sst":"fmk","name":"\/a101","thCritical":"98","nbThCritical":null,"thWarning":"97","nbThWarning":null,"deltaCritical":null,"deltaWarning":null,"stopStart":null}],"total":7}}
    Best Regards
    kevin

  4. #4

    Default

    Hello there,

    After several different tests, I can not seem to apply a renderer for all types of columns than the default.

    Is this normal?

  5. #5
    Ext JS Premium Member
    Join Date
    Nov 2007
    Location
    Denver, CO
    Posts
    1,045

    Default

    It seems so for number columns:

    PHP Code:

        constructor
    : function(cfg) {
            
    this.callParent(arguments);
            
    this.renderer Ext.util.Format.numberRenderer(this.format);
        } 
    renderer appears to be hijacked in the constructor, and there's no other code referencing renderer.

    stevil

Posting Permissions

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