Results 1 to 3 of 3

Thread: How to add id attribute to a div-EXTJS3

  1. #1

    Default How to add id attribute to a div-EXTJS3

    I have a component whose 'id' is auto-generated. I want to replace that id with my own for styling purposes. I'm unable to use class for styling as the class is used by bunch of other components.
    that results into:

    <input type="text" size="16" autocomplete="off" id="ext-comp-1100" name="ext-comp-1100" class="x-form-text x-form-field q-superdate-field x-form-empty-field x-trigger-noedit" readonly="" style="width: 100px;">
    I want to change the width of the input field using id. Is there a way to replace exisiting 'Id' and create one of our own

  2. #2
    Sencha User
    Join Date
    Feb 2013


    Rather than changing IDs, perhaps you could use the cls config.

  3. #3


    so I have condition depending on which i need to add the styling class. so tried this as per suggested:

    Code:, Ext.apply({            mode: this.mode
                itemCls: this.mode == true ? 'required-datepicker' : '',
                cls: 'q-superdate-field'
    for some reason the above condition seems to be false always and hence the class is not getting added or may im doing something wrong all together. any other suggestions that could work in this case?

Similar Threads

  1. How to using TreeGrid in Extjs3.2.1
    By anya in forum Ext 3.x: Help & Discussion
    Replies: 11
    Last Post: 18 Mar 2012, 11:15 PM
  2. ExtJS3 dead?
    By defcon1 in forum Ext 3.x: Bugs
    Replies: 1
    Last Post: 4 May 2011, 7:19 AM
  3. Replies: 0
    Last Post: 1 Nov 2009, 8:10 AM
  4. does "BasicForm" have any attribute like html Form "target" attribute
    By michoeal in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 25 Dec 2007, 3:05 AM

Posting Permissions

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