Results 1 to 3 of 3

Thread: Checkbox column renderer doesn't seem to work

  1. #1
    Sencha User
    Join Date
    Oct 2007
    Posts
    57

    Default Checkbox column renderer doesn't seem to work

    Hi

    I have a GridPanel with a booleancolumn something like (simplified code to show all involved which I think may be relevant):
    PHP Code:
    var grid = new Ext.grid.GridPanel({
    ...
        
    cm: new Ext.grid.ColumnModel({
            
    defaults: {width90,sortabletrue},
            
    columns: [
                {
    header'Header',dataIndex:'neemtdeel',editor:{xtype:'checkbox'},renderer: function(){alert('Hi');},width:50,xtype:'booleancolumn'},
    ... 
    // other columns
            
    ]
        }),
        
    plugins:[new Ext.ux.grid.RowEditor({cancelText'Annuleren',saveText'Bewaren'})],
        
    sm = new Ext.grid.RowSelectionModel(),
    ... 
    But whatever I try, the renderer function never seems to fire (I also tried console.info).

    The renderers seem to work for other column types, but not for boolean although as far as I can tell, it's documented.
    What I'm trying to do, by the way, is not only use trueText and falseText (not showing for simplicity) but to have a class which sets the complete cell green or red to have a real visual effect.

    All help appreciated!

    Patrick

  2. #2
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    Why would you want to specify your column as booleancolumn and define a renderer?

    Having a default renderer is the only thing that differentiates booleancolumn from a normal gridcolumn.

    ps. Wouldn't you rather use a Ext.ux.grid.CheckColumn?

  3. #3
    Sencha User
    Join Date
    Oct 2007
    Posts
    57

    Default Jeez, you make it sound so simple!

    Worst thing, sometimes it is ;-)

    I tried a lot, but not to remove the xtype completely!
    You're a champ Condor!
    B.t.w. I also use your grid addField and it works like a charm.

    Why not use Ext.ux.grid.CheckColumn?
    Well, I'm not sure; I'm using the row editor for other columns too and for some reason I had the impression both somehow do the same thing. Is that a wrong assumption or did I choose the wrong one for the job?!

    Can I ever thank you enough for your efforts in answering all these questions?
    Very much appreciated!!!

    Patrick

Similar Threads

  1. renderer metadata.css doesn't work
    By davidsk in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 8 Jul 2010, 10:08 AM
  2. Problem: Autoheight doesn't work fieldset with checkbox toggle
    By irallaa in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 26 Jan 2009, 7:55 AM
  3. [FIXED] CheckBox Readonly Doesn't Work
    By nathan.modrzewski in forum Ext GWT: Bugs (1.x)
    Replies: 4
    Last Post: 12 May 2008, 6:09 PM
  4. Using a renderer on a column doesn't seem to work with sort?
    By donalconlon in forum Ext 1.x: Help & Discussion
    Replies: 7
    Last Post: 11 Dec 2006, 1:32 PM

Posting Permissions

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