Results 1 to 2 of 2

Thread: How to enable/disable checkbox in a grid using renderer

  1. #1
    Sencha User
    Join Date
    Apr 2014
    Posts
    53

    Default How to enable/disable checkbox in a grid using renderer

    I need to load a grid based on the query results I get. I am not having any issues with loading the text fields in the grid but there is one particular column which is a check box type. I am using the xtype: 'checkcolumn' for this purpose. The object that returns the query results returns a "Y" or "N" for this particluar column. If it is "Y", I need to enable the checkbox and if it is "N", the checkbox should be disabled. I am using the following code for defining my checkbox field.
    {
    xtype: 'checkcolumn',
    header: "Old User",
    disabled: true,
    disabledCls:'x-item-enabled',
    width: 170,
    dataIndex: 'oldUser',
    itemId: 'oldUser',
    renderer: this.checkOldUser
    }

    checkOldUser: function (oldUser) {
    if(oldUser== 'Y') {
    this.oldUser.setDisabled(false);
    }
    }
    This renderer function is not working for me. How should the renderer look like?. Can you please let me know how to resolve this issue?. Thanks....

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,410
    Answers
    716

    Default

    Check the code in this SO post: (code in answered post)
    http://stackoverflow.com/questions/1...on-special-row

Tags for this Thread

Posting Permissions

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