1. #1
    Sencha User
    Join Date
    Oct 2011
    Location
    Paris, France
    Posts
    33
    Answers
    1
    Vote Rating
    0
    near is on a distinguished road

      0  

    Question Answered: ERROR WITH CHECKOLUMN

    Answered: ERROR WITH CHECKOLUMN


    Hi,
    I have a problem, with the "xtype": 'checkcolumn'. I can set a column in my grid, whose data index type is a boolean without problem, but when I try to set the column type to 'checkcolumn' I get this error:

    Uncaught TypeError: Cannot call method 'substring' of undefined,


    Can anybody tell m what's wrong, is it a bug ?

    Thank's in avance

    Regards
    near

  2. Using Ext.require will only help if you have the dynamic loader enabled and the UX files are in the right place.

    You'd be better off just including it using a script tag. CheckColumn.js can be found in the ExtJS zip file you downloaded. It's in the directory examples/ux. It also needs a CSS file, CheckHeader.css, and the 2 images mentioned therein.

  3. #2
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    1,074
    Answers
    111
    Vote Rating
    94
    Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light

      0  

    Default


    What I am using is this:

    Code:
    { header: 'Column header', dataIndex: 'booleanTypeFieldInStore', width: 135,  
      renderer: function(value) {    // This function converts true and false into checkbox checked or  unchecked
        if(value == "0" || value == "false")
          value = false;
        else if(value == "1" || value == "true")
          value = true;                    
        return "<input type='checkbox' disabled='disabled'" + (value ? "checked='checked'" : "") + ">";
      }
    }
    It renders an HTML checkbox in the grid cell.

  4. #3
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,508
    Answers
    528
    Vote Rating
    288
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    CheckColumn isn't a part of the core library, it's a UX. That error means that you've forgotten to include the relevant JS file.

  5. #4
    Sencha User
    Join Date
    Oct 2011
    Location
    Paris, France
    Posts
    33
    Answers
    1
    Vote Rating
    0
    near is on a distinguished road

      0  

    Default


    Hi Skirtle,
    does the ext-all-debug.js include UX files ?

  6. #5
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    1,074
    Answers
    111
    Vote Rating
    94
    Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light

      0  

    Default


    No. You may include it by putting it in Ext.require:

    Code:
    Ext.require([
        // any other things you use
        'Ext.ux.CheckColumn'
    ]);

  7. #6
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,508
    Answers
    528
    Vote Rating
    288
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    Using Ext.require will only help if you have the dynamic loader enabled and the UX files are in the right place.

    You'd be better off just including it using a script tag. CheckColumn.js can be found in the ExtJS zip file you downloaded. It's in the directory examples/ux. It also needs a CSS file, CheckHeader.css, and the 2 images mentioned therein.

  8. #7
    Sencha User
    Join Date
    Oct 2011
    Location
    Paris, France
    Posts
    33
    Answers
    1
    Vote Rating
    0
    near is on a distinguished road

      0  

    Default


    thank's guys ! it works !

Thread Participants: 2

Tags for this Thread