Announcement

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

    removeRecordClick is not called

    I'm using the latest 3.0 nightly. I created a subclass of ListGrid and I'm trying to override removeRecordClick. It's not marked as an override point in the docs, but the description indicates that it should be.

    All I really want is to get notified when a row is removed and this was the only method I could find for that.

    #2
    From the docs:
    public void removeRecordClick(int rowNum)

    Handler fired when the user clicks the "remove" icon if canRemoveRecords is true. Default behavior will remove the record from the data set, or if we're deferring removal mark record as removed [or for records already marked as removed, clear this removed marker].

    If warnOnRemoval is set, this method will also show a warning dialog to users allowing them to cancel the removal.
    Is this not supposed to be overridable? Is there some other way to allow only certain records to be deleted?

    Comment


      #3
      I just encountered this as well, with the 3.0p.20120120 nightly. removeRecordClick is defined in the Grid wrapper, so we can call "down" into SmartClient and simulate the user clicking the "X", but I can't find any JSNI that calls "up" to it, so overriding does no good.

      It would be helpful if this were wired up as documented since my implementation also requires a callback when the user clicks the "X" to delete the grid record. This particular grid is not DS bound so the default behavior isn't valid... making the very cool setCanRemoveRecords(true) option useless.

      Is there another callback triggered by the user clicking the "X" that we can use?

      Comment


        #4
        In 4.0, ListGrids have a RemoveRecordHandler, so this is nicely solved.

        Comment

        Working...
        X