jQuery UI Widgets Forums Grid Deleting with selectionmode checkbox

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

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • Deleting with selectionmode checkbox #101251

    Pietervk
    Participant

    I would like to implement a multiple row deletion facility. When the user presses Delete, I switch the grid to selectionmode: ‘checkbox”, so the user can select the rows that need to be deleted.

    When selectionmode is ‘checkbox’, you can select all rows by selecting the checkbox in the header row of the grid.

    The grid is having pageable: true. To my surprise, all rows in the grid are selected, rather than just the ones on the visible page.

    I think this is counterinuitive, in different from common implementations. I think when having pageable= true, the top checkbox should only check the rows in the current page. The user can move to the next page and select the top box again, which should add to the selection.

    Is it possible to get this change, or is there another way I can force this behavior?

    Thanks
    Pieter

    Deleting with selectionmode checkbox #101275

    Hristo
    Participant

    Hello Pieter,

    I understand your point of view but this is a more philosophical case study.
    We have a similar discussion about this. Please, take a look at this topic:
    https://www.jqwidgets.com/community/topic/select-all-checkbox-2/
    In this topic, you will find approaches to how you could achieve the desired behavior.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

    Deleting with selectionmode checkbox #101278

    Pietervk
    Participant

    Hi Hristo,
    I did some further testing. The problem is the SelectAllRows that is called when you click on the header..

    Please have a look at the fiddle: https://jsfiddle.net/petitbarzun/ugkH2/180/

    The solution on your link looks different to me, but I will study it further

    Thanks

    Pieter

    Deleting with selectionmode checkbox #101300

    Pietervk
    Participant

    The solution mentioned does not work in my case, I want to dynamically switch to the checkbox mode when deleting items.

    To be honest, I think there is nothing philosophical about UI design. When you use the checkbox to enable deletion, it should not delete everything. Perhaps there are other use cases where you want that, although I find it hard to find one.

    Deleting with selectionmode checkbox #101346

    Hristo
    Participant

    Hello Pieter,

    I would like to suggest you look at this example.
    It demonstrates the mentioned scenario wherein a case to checked the header’s checkbox then all rows in the current page will be selected.
    If you want to have more options for deleting selected rows you should add additional logic.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

    Deleting with selectionmode checkbox #101465

    Pietervk
    Participant

    Thanks Hristo,
    this looks like what I want, except that I want to only show the checkboxes when the user starts the bulk delete action. Also the solution is rather complex to maintain.

    I still suggest this for standard behavior of the grid with selectionmode=checkbox, or at least an option on the column checkbox setting “ColumnCheckBoxPageOnly=True” or something like that. Alternatively have a new selectionmode, selectionmode=checkboxpageonly. Can you suggest this to the development team?

    Pieter

    Deleting with selectionmode checkbox #101526

    Hristo
    Participant

    Hello Pieter,

    Thank you for this suggestion.
    I will discuss this with our colleagues.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.