jQWidgets Forums

jQuery UI Widgets Forums Angular jqxGrid changes not saved when user clicks filterrow

This topic contains 5 replies, has 2 voices, and was last updated by  admin 8 months ago.

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

  • hhla
    Participant

    I have jqxGrid (selectionmode: multiplecellsadvanced, filterable: true, filtermode: simple, sortable: true, editable: true). There is column with columntype dropdownlist. Changes are saved on updaterow function. The saving works in all other situations, but not when the user makes a choice from the cell’s dropdownlist and immediately after that clicks the filterrow of the grid at another column and filters so that the row that was just edited is no longer in the grid. After this, the user can continue editing without noticing that the previous change was not saved.

    Is there any event triggered when user clicks on filterrow? I found some really old topics on the forum where some events were suggested, but based on my tests, none of the suggested events seem to trigger. Maybe there have been some changes in these over the years? If such an event exists, I could try to force the saving when the user moves to the filterrow. Or what would be the best way to fix the problem?


    admin
    Keymaster

    Hi hhla,

    If your cell is in editing mode, the ‘cellendedit’ event is triggered. This will ensure that when a user selects a value from the dropdown and then clicks away, the value is saved before any filtering action can affect the grid’s state.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    https://www.jqwidgets.com/


    hhla
    Participant

    I tested that but the ‘cellendedit’ event is not triggered when user clicks on filterrow. It is triggered after the user has filtered the grid. Shouldn’t the updaterow of the dataadapter already be triggered automatically every time cellendedit occurs? Now the dataadapter’s updaterow doesn’t happen when the user clicks on filterrow. But it happens every time the user clicks anywhere other than the filterrow after editing. And the problem is precisely that the dataadapter’s updaterow is not called at all in that situation and user is allowed to filter the edited row away and the change is lost. I would assume that it is due to the fact that cellendedit is not triggered. So is there a bug in the dataadapter, when it doesn’t notice that the datasource has changed, or in the filterrow when the cellendedit is not triggered when the focus moves to it? I assumed that there would be an event that would be triggered when the user clicks on a cell in the filterrow, where I could separately trigger cellendedit and thereby make the dataadapter do an updaterow. Is there really no way to notice when the user clicks on the filterrow?


    admin
    Keymaster

    Hi hhla,

    There is such an event, it is called ‘filter’ when a filter is applied to the Grid.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    https://www.jqwidgets.com/


    hhla
    Participant

    Ok, so there is no such event that would be triggered when the user clicks on the filterrow.


    admin
    Keymaster

    Hi hhla,

    Click on a filter row – now, but when a filter is applied, the filter event is raised.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    https://www.jqwidgets.com/

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

You must be logged in to reply to this topic.