Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Questions about bulk operations

    Hi.
    We are currently implementing so called bulk operations. For that we need to collect some records in the grid
    and then trigger a bulk operation on these collected records. I would like to know your opinion about these two approaches
    and also please answer my questions below.

    Approach 1: Using solution with settings SelectionAppearance.CHECKBOX and SelectionStyle.SIMPLE
    Questions to this approach:
    - is it possible to show error icon next to the checkbox field ? if yes, how ?
    - is it possible to select record not just by clicking on the checkbox field but on any cell in the record ? if yes, how ?

    Approach 2: Using additional defined column of type boolean
    Questions to this approach:
    - is it possible to use this checkbox only to collect selected records, and not mark row or cell as edited (meaning without setting canEdit=true) ?
    -- the reason for question above is, that it is causing problems in a sense that for example if you click on header of grid to trigger a sort,
    -- it is showing message about if user want to save or discard changes in the grid. And this is unwanted.

    Questions for both approaches:
    - is it possible to show icon next to the checkbox field informing about successful bulk operation ?
    -- so basically the opposite to error icon. if yes, how ?

    Just FYI: we choosed the second approach, because we use selection for showing the row details in another section.

    Thank you,
    Fero

    #2
    Since you're using selection for something else, you definitely do not want approach #1.

    Since you don't want the checkbox to be treated as an edit, you don't quite want approach #2 either. Instead of marking the field canEdit+canToggle, you should just implement a CellFormatter that outputs a checked or unchecked checkbox, adding a CellClick handler to manage toggling and untoggling the field.

    This will also give you sufficient control to add your own success or error message display.

    Comment


      #3
      Hi,

      we followed your approach with CellFormatter and CellClick handler.
      Unfortunately we have now problem with refreshing grid after successful bulk operation (we did not have this problem with approach #2).
      It is working well in cases, when we have in grid more than cca 100 records. If it is less, grid is not updated.
      For update operation we are returning updated record back to client and for remove operation it is the primary key.
      All DsRequests for one bulk operation are sent to the server in a separate Queue.
      We tried also to call grid.refreshRow(), but it did not help.

      Do you have any idea what could be wrong? Are we missing here something ?

      Thanks,
      Fero

      Comment


        #4
        Sorry, that's way too little information to allow us to comment meaningfully. All we can suggest is to look carefully at your logic and the data in the grid after the attempting refresh.

        Comment

        Working...
        X