Announcement

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

    Detect when a record gets removed from a listGrid

    The documentation on ListGrid.setCanRemoveRecords() seems to indicate that when set to true; the actual remove is done by invoking ListGrid.removeData().

    How do you intercept that call? Because apparently this:

    Code:
    public class MyListGrid extends ListGrid
    {
    
    
    @Override
    public void removeData(Record record)
    {
       Log.debug("Record removed.");
       super.removeData(record);
    }
    }
    never gets called.

    I want to intercept the remove so I can kick of an event to some listeners (mainly to notify a form that the ListGrid is part of that the contents of the grid has changed).

    #2
    Yeah this has been asked a lot of times, the best way is to create your own ListGridField, very simple to do, which performs the remove and you can easily then intercept the event. There is an internal function getting called, so short of JSNI you can't intercept it on the client side currently.

    Comment


      #3
      Thanks Svjard. That is in fact the solution I ended up using and it works.

      Comment

      Working...
      X