Buttons - Column visibility

Buttons - Column visibility

mehulcroodsmehulcroods Posts: 3Questions: 2Answers: 0
edited September 2020 in Free community support

can i use Button Column visibility as per user role. like same datatable used by many user and they can customize datatable as per their choice and it will not effect on other user. is that possible in datatable column visibility?

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,599

    The Column Visibility Button just affects the current display, so won't affect anybody else viewing the table,

    Colin

  • mehulcroodsmehulcroods Posts: 3Questions: 2Answers: 0

    Hello colin,

    it's right. but i used State saving with it. so user can save selected column.
    but the issue is that when multiple user use same datatable and they select column as per their choice then it effect other user's selected column when they login again.

    so i want Button Column visibility in datatable as per user.

    suppose there is datatable named "product" and it have 5 column.And there are also 2 user use the same "product" datatable. "USER1" select column(1,3,5) and "USER2" select column(2,3,4,5). now when they login again then they can show their own selected column like "USER1" can see column(1,3,5) and "USER2" can see column(2,3,4,5).
    my project is in spring boot.

    is this possible in datatable in anyway?

  • colincolin Posts: 15,237Questions: 1Answers: 2,599
    Answer ✓

    but the issue is that when multiple user use same datatable and they select column as per their choice then it effect other user's selected column when they login again.

    Are you using stateSave and using stateSaveCallback to store that on the server, as you didn't mention that in your post?

    If that is the case, you'll need to also pass an identifier for the user, so you can ensure you load their state.

    Colin

This discussion has been closed.