Announcement

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

    Filtered row and events

    Hi,

    Suppose that:
    - I've got a ListGrid and a (details) DynamicForm connected to the same DataSource; typical Master/Detail situation.
    - A filter is applied in the list grid by using fetchData(criteria) and a record is selected.
    - I change the record in the details form so that it does NOT match the list criteria anymore, and save.
    - The DB is correctly updated and thanks to SGWT magic it's also automatically removed from the grid

    My problem is the following: how can I be notified of the removal from the list grid ? I would have expected at least a SelectionChanged event (which is true) ? Anything else ? I need this in order the clear the details form when the viewed record simply was removed from the list because of a filter.

    Thanks for your help,
    Thomas

    PS: SmartGWT 4.0p

    #2
    DataChanged fires at this time, which you could use to see if the previously selected record still exists in the ResultSet (use find(), passing the primary key value).

    SelectionChanged doesn't currently fire in this circumstance, because many UIs would not want to clear an adjacent form or other UI that is attached to selection. We may add a flag in the future to make this an optional behavior (or consider Feature Sponsorship if you really want this now).

    Comment


      #3
      How can I react on this DataChanged event you are talking about ?
      I do not see any addDataChangedHandler() or similar in the ListGrid ?

      Comment


        #4
        DataChanged is on ResultSet

        Comment

        Working...
        X