Results 1 to 2 of 2

Thread: How to disable icon/button in a grid?

  1. #1
    Sencha User
    Join Date
    Mar 2014
    Posts
    1

    Default How to disable icon/button in a grid?

    Hi, I've been working on some ExtJS code for most of this week just trying to get a clickable icon to display in a grid. We can get the icon to display and click on it. But, ultimately we want to be able to disable (gray out or hide) and then enable it when the radio button (BankInstrRadio) on the same row is selected. The only thing I've been able to do is hide the button. But then I can't figure out how to unhide it. Does anyone know of a way to do this? I wouldn't think it would be that difficult, but then again I'm not a ExtJS or javascript expert. Any help would be appreciated! Here is a snippet of the code that displays the bankEdit icon:

    items: [
    {
    xtype: 'container',
    html: 'Bank Instructions',
    padding: '0 0 0 5',
    cls: 'sell-container-header'
    },
    {
    xtype: 'grid',
    title: false,
    header: false,
    store: 'bankInstructionsStore',

    columns: [
    {
    flex: 0.01,
    xtype: 'templatecolumn',
    tpl: new Ext.XTemplate('<input type="radio" name="BankInstrRadio" {bankRadioChecked} />')
    },
    {
    text: 'Bank Name',
    dataIndex: 'bankName',
    flex: 3,
    menuDisabled: true
    },
    {
    text: 'Account',
    dataIndex: 'bankAccountNumberEdited',
    flex: 2,
    menuDisabled: true
    },
    {
    flex: 0.75,
    xtype: 'templatecolumn',
    tpl: new Ext.XTemplate('<i id="bankEdit" class="alloy-icon-edit" data-qtip="Edit"/>'
    )
    }
    ],

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

    Default

    You should consider using an actioncolumn so you can use getClass to style.

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
  •