Highlight changed controls

  1. #1

    Highlight changed controls

    Hello

    I need to implement behavior that if control value is changed by user, after the page is loaded, it's background is changed as well. This include all basic controls ( TextField, Combobox, CheckField,....)
    I was thinking about subclassing all the fields (on client side) and based on the value and changed event modify with its css class
    Is there any other - easier way - especially without subclassing?

    Thanks
    Z
  2. #2
    Hi,

    Quote Originally Posted by Zdenek View Post
    Is there any other - easier way - especially without subclassing?
    Well, you don't need a sub-class to attach a Change listener.

    As far as I can understand you need a global way to attach a Change listener for all fields. I can suggest this way.

    Example
    <ext:ResourceManager runat="server">
        <Listeners>
            <DocumentReady Handler="Ext.ComponentMgr.all.each(function (c) {
                                        if (c.isFormField) { // or, for example, (c instanceof Ext.form.Field)
                                            c.on('change', function (field) {
                                                field.addClass('your-highlight-css-class');
                                            });
                                        }
                                    });" />
        </Listeners>
    </ext:ResourceManager>

Similar Threads

  1. Replies: 2
    Last Post: Jun 07, 2012, 4:29 PM
  2. [CLOSED] Highlight multiple rows
    By rthiney in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 23, 2011, 8:24 AM
  3. [CLOSED] How to highlight menuitem in Menupanel
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 06, 2011, 3:24 PM
  4. [CLOSED] Treepanel How to Highlight certain Nodes
    By dheeraj_us in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 13, 2010, 6:06 AM
  5. TreePanel node highlight not resizing
    By dbassett74 in forum Bugs
    Replies: 1
    Last Post: May 24, 2009, 10:51 PM

Posting Permissions