Package com.smartgwt.client.widgets.grid.events

# Interface HasFilterEditorSubmitHandlers

All Superinterfaces:
  `HasHandlers`

All Known Implementing Classes:
  `CalendarView`, `CubeGrid`, `DateGrid`, `EditTree`, `ListGrid`, `ListPalette`, `Menu`, `MenuPalette`, `PickListMenu`, `RecordEditor`, `SelectionTreeMenu`, `TableView`, `TreeGrid`, `TreePalette`

public interface HasFilterEditorSubmitHandlers extends HasHandlers

- ## Method Summary

  Modifier and Type
  Method
  Description
  `HandlerRegistration`
  `addFilterEditorSubmitHandler(FilterEditorSubmitHandler handler)`
  Optional notification fired when the user performs a filter using the `Filter Editor`.

  ### Methods inherited from interface com.google.gwt.event.shared.HasHandlers

  `fireEvent`

- ## Method Details

  - ### addFilterEditorSubmitHandler

    HandlerRegistration addFilterEditorSubmitHandler(FilterEditorSubmitHandler handler)
    Optional notification fired when the user performs a filter using the `Filter Editor`. Useful for applying additional criteria not available in the filterEditor. Note that it is often easiest to do this with the `SearchForm` attribute, which requires no code.

    May fire as criteria values are being edited if `filterByCell` or `filterOnKeypress` is true, otherwise will fire when the user clicks the filter button or presses the Enter key while focus is in the Filter Editor.

    Use event.cancel() to cancel the default behavior - you must cancel the default behavior if your code is going to call `filterData()`, `setCriteria()` or any other API that affects the criteria applied to the grid.

    The `criteria` parameter contains the current criteria applied to the grid including edits the user has just made using the Filter Editor and those applied with the `advanced filtering dialog`. A call to `getFilterEditorCriteria()` does not include the `advanced filtering criteria`.

    If you wish to access the `criteria` applied to the grid without picking up any edits to the Filter Editor, use `getCriteria()` instead.

    Developers may wish to perform a filter using the Filter Editor values from code running outside the standard filterEditorSubmit flow. For example, if you wanted a confirmation dialog to be shown before filtering was performed, you would cancel the default behavior as described above, but then need to replicate the default behavior once the user confirms that they want to proceed. To replicate the default behavior, just call:

           grid.filterData(grid.getFilterEditorCriteria());

    or, to ensure the specified `autoFetchTextMatchStyle` is picked up

           DSRequest request = new DSRequest();
           request.setTextMatchStyle(grid.getAutoFetchTextMatchStyle());
           grid.filterData(grid.getFilterEditorCriteria(), null,
                request);

    Parameters:
      `handler` - the filterEditorSubmit handler
    Returns:
      `HandlerRegistration` used to remove this handler