jQWidgets Forums

jQuery UI Widgets Forums Grid Editor OnChange in FireFox

This topic contains 5 replies, has 2 voices, and was last updated by  Peter Stoev 11 years, 2 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • Editor OnChange in FireFox #50947

    msalvatore
    Participant

    Hello JQWidget friends,

    I am trying to use the grid editor to perform a function on change of an input field. The change fires in IE and Chrome, but not on Firefox.

    { text: 'Display Name', datafield: 'DisplayName', renderer: columnsrenderer, width: '50%',
               createeditor: function (row, cellvalue, editor) {
                      editor.jqxInput();
    
                       editor.on('change', editor, function (event) {
                            alert('change');
                            var cVal = editor.jqxInput().val();
                                    
                            var scp = angular.element('[ng-controller="TableFieldDefinitionCtrl"]').scope();
                             if (scp == null)
                                 displayError("TableFieldDefinitionCtrl scope null!");
    
                             scp.update('DisplayName', cVal, row);
                                });
                            }
                        }
    }
    

    Any help would be greatly appreciated. Thanks! -Matt

    Editor OnChange in FireFox #50958

    Peter Stoev
    Keymaster

    Hi msalvatore,

    Change is an event raised by HTML Input and as such is inherited by jqxInput. However, I think that the binding here is wrong. It should be:

      editor.on('change', function (event) { not  editor.on('change', editor, function (event) {
    

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Editor OnChange in FireFox #51007

    msalvatore
    Participant

    Hello Peter,

    I changed the code as suggested, but the event is still not raised in FireFox.

    { text: 'Display Name', datafield: 'DisplayName', renderer: columnsrenderer, width: '50%',
               createeditor: function (row, cellvalue, editor) {
                      editor.jqxInput();
    
                       editor.on('change', function (event) {
                            alert('change');
                            var cVal = editor.jqxInput().val();
                                    
                            var scp = angular.element('[ng-controller="TableFieldDefinitionCtrl"]').scope();
                             if (scp == null)
                                 displayError("TableFieldDefinitionCtrl scope null!");
    
                             scp.update('DisplayName', cVal, row);
                                });
                            }
                        }
    }
    Editor OnChange in FireFox #51008

    Peter Stoev
    Keymaster

    Hi msalvatore,

    In order to use custom editors in jqxGrid, see: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/cellcustomediting.htm?arctic. I also think that you should handle “cellvaluechanged” event, not an event of some editor.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Editor OnChange in FireFox #51011

    msalvatore
    Participant

    We originally used cellvaluechanged but it was causing issues with other events. Is there any reason why the change in the editor wouldn’t work in FireFox? It works perfectly in IE and Chrome.

    Editor OnChange in FireFox #51013

    Peter Stoev
    Keymaster

    Hi msalvatore,

    I don’t know. We do not raise that event. It is raised by the web browser. In addition, there’s no such editor in jqxGrid available. jqxInput is a custom editor, but in your code it is not implemented as custom editor. Please, look at the sample I pointed you and use the same approach if you wish to create custom editors.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.