Results 1 to 3 of 3

Thread: RowEditing updateButton

  1. #1
    Sencha User
    Join Date
    Dec 2010
    Posts
    16

    Default RowEditing updateButton

    Hello,

    I have a grid with the using the RowEditing plugin. Almost each field has a validator that checks whether the data inserted is correct. When I edit the row the update button is inactive and I read that if the fields have validators it remains inactive. My problem is that the button continues to be inactive even after I filled in correctly the form. Moreover the button remains inactive but if I hit Enter key the row is saved/updated correctly. How could I make the button active?

    Thanks

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,448
    Answers
    3997

    Default

    The button should remain inactive until the form is valid. Can I get a test case to look at what is going on?
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

  3. #3
    Sencha User
    Join Date
    Dec 2010
    Posts
    16

    Default

    All the fields have the same structure as the below:

    Code:
    header: "Initial point",
                    dataIndex: 'N_KM_INI_1',
                    width: 100,    
                    sortable : true,
                    field: {
                        name: N_KM_INI_1',
                        xtype: 'numberfield',
                        minValue: 0,
                        width: 100,
                        maxValue: 1000000,
                        hideTrigger: true,
                        keyNavEnabled: false,
                        mouseWheelEnabled: false,    
                        validator: function(val) {
                            var campo = Ext.getCmp('nKmIniQad2').getValue();
                             if (campo <= val) {
                                 if(val - campo >= 800) {
                                     return "Km fine non puo' essere minore di km inizio";
                                 } else {
                                     return true;   
                                 }
                             }
                             else {
                                 return "Km fine non puo' essere minore di km inizio";
                             }
                        }
                    }

    when I complete filling in all the fields the button remains inactive. Hope it is clear.

    thanks

Posting Permissions

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