jQWidgets Forums

jQuery UI Widgets Forums Grid end editing after editor dropdown closes

This topic contains 3 replies, has 2 voices, and was last updated by  Hristo 5 years, 3 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author

  • RobWarning
    Participant

    Hi,
    standard behavior of a jqxgrid is that cellendedit is called when an editable column of a different row is selected.
    I have just one editable column in my grid. the editor is a dropdownlist. I would like that editing stops and cellendedit is called as soon I have selected a new value in the dropdownlist. is this possible?

    this is my definition of the column:

    {
    text: ‘Status’, datafield: ‘status’, width: 120, columntype: ‘dropdownlist’, cellbeginedit: function (row, datafield, columntype, value)
    {
    if (value === ‘Deleted’||value ===’Canceled’) {
    return false; //Disable Editing if status is Deleted or canceled
    }
    },
    createeditor: function (row, cellvalue, editor, celltext, cellwidth, cellheight) {
    var dataSource;
    dataSource = [ ‘Tentative’, ‘Nieuw’, ‘Approved’,’Deleted’, ‘Processed’ ];
    editor.jqxDropDownList({ source: dataSource });
    }
    }

    end editing after editor dropdown closes #107906

    Hristo
    Participant

    Hello RobWarning,

    You could achieve this as you implement the logic as you bind to the select event of the jqxDropDownList in the createeditor callback.
    Please, try this suggestion and if you have any questions feel free to ask.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    https://www.jqwidgets.com

    end editing after editor dropdown closes #107910

    RobWarning
    Participant

    I have tried this:

    createeditor: function (row, cellvalue, editor, celltext, cellwidth, cellheight) {
                        var dataSource;
                        dataSource = [ 'Tentative', 'Nieuw', 'Approved','Deleted', 'Processed' ];
                        editor.jqxDropDownList({ source: dataSource });
                        editor.jqxDropDownList.on('select', function () {
                            alert('end editing');
                        });
                    }

    But the alert will not trigger. maybe I am binding the event on a wrong way?

    also this has no effect:

     createeditor: function (row, cellvalue, editor, celltext, cellwidth, cellheight) {
                        var dataSource;
                        dataSource = [ 'Tentative', 'Nieuw', 'Approved','Deleted', 'Processed' ];
                        editor.jqxDropDownList({
                            source: dataSource,
                            select: function () {
                                alert('end editing');
                            }
                        });
                    }

    Hristo
    Participant

    Hello RobWarning,

    Please, try to bind on that way:

    editor.on('select', function () {
      alert('end editing');
    });

    Best Regards,
    Hristo Hristov

    jQWidgets team
    https://www.jqwidgets.com

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

You must be logged in to reply to this topic.