[CLOSED] [#31] Show/Hide ComponentColumn Textfield

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] [#31] Show/Hide ComponentColumn Textfield

    I have a Gridpanel with a Componentcolumn:

    <ext:ComponentColumn ID="ComponentColumnComentarios" 
    runat="server" 
    Editor="true"
    DataIndex="Coment"
    Flex="1"
    Text="Comentarios">
    <Component>
    <ext:TextField ID="TextFieldComentarios" runat="server" />
    </Component>
    </ext:ComponentColumn>
    I want to hide or disable the Textfield when the record data has a specific value, for example, when record.data.status="0" the user can't edit the Coment column.

    I haven't found any example to do something like this, can you provide one please?
    Last edited by Daniil; Feb 14, 2013 at 9:39 AM. Reason: [CLOSED]
  2. #2
    Hi @Antonio09,

    You can configure a Component within a ComponentColumn Bind listener.
  3. #3
    thanks! I solved it by adding this listener to the ComponentColumn:

    <Listeners>
    <Bind Fn="ConfigComent">
    </Bind>
    </Listeners>
    </ext:ComponentColumn>
    var ConfigComent = function (column, cmp, record) {
                    if ((record.get('Paso') == 0) || (record.get('BoletinadoPuesto') == 1) || (record.get('BoletinadoOrg') == 1)) {
                        cmp.hide();
                    }
                };
    But when the TextField is hided the column doesn't show the value, I try with cmp.setReadOnly(true); but I want to hide the TextField and keep the value displayed in the column, please help!
  4. #4
    Hi Antonio,

    Thank for sharing the solution. It can help someone on the forums in the future!
  5. #5
    Hi, I think you missed this part:

    Quote Originally Posted by Antonio09 View Post
    But when the TextField is hided the column doesn't show the value, I try with cmp.setReadOnly(true); but I want to hide the TextField and keep the value displayed in the column, please help!
  6. #6
    Apologize.

    Such behavior is currently not supported if you need editing options. We will investigate a possibility how to achieve it.
    Last edited by Daniil; Dec 13, 2012 at 9:27 AM.
  7. #7
    Opened an Issue to track this defect, see

    https://github.com/extnet/Ext.NET/issues/31

Similar Threads

  1. Show/Hide fieldset
    By JosefTrbusek in forum 2.x Help
    Replies: 2
    Last Post: Aug 03, 2012, 7:04 AM
  2. [CLOSED] [1.0] Show/Hide textfield created runtime with listeners
    By PoloTheMonk in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 26, 2010, 10:57 AM
  3. Show/Hide tabs
    By stone216 in forum 1.x Help
    Replies: 2
    Last Post: Oct 01, 2009, 8:21 PM
  4. Replies: 3
    Last Post: Jul 14, 2009, 7:02 AM
  5. [CLOSED] TextField Hide
    By Immobilmente in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Feb 02, 2009, 5:23 AM

Posting Permissions