Skip to main content

Methods to Update the Grid State in Actions

When you handle specific data operations (paging, sorting, grouping or filtering) in the corresponding Actions, you need to update the grid state with the state of the currently processed operation. You can do this with ease by using specific operation-related methods exposed by the GridViewModel object. Each method accepts a parameter/parameters representing the currently processed data operation’s state, which is automatically passed to a handling Action.

Operation

Method

Call with the Accepted Parameter(s) (Passed to Action)

Paging (GridViewOperationType.Paging)

GridViewModel.ApplyPagingState

ApplyPagingState(GridViewPagerState pagerState)

Sorting (GridViewOperationType.Sorting)

GridViewModel.ApplySortingState

ApplySortingState(GridViewColumnState columnState)

ApplySortingState(GridViewColumnState columnState, bool reset)

Grouping (GridViewOperationType.Grouping)

GridViewModel.ApplyGroupingState

ApplyGroupingState(GridViewColumnState columnState)

Filtering (GridViewOperationType.Filtering)

GridViewModel.ApplyFilteringState

ApplyFilteringState(GridViewFilteringState filteringState)

or (if only one column can be filtered within the grid at a time):

ApplyFilteringState(GridViewColumnState columnState)

Refer to the Action Types and Passed Parameters topic to learn more on operation-specific parameters passed to handling Actions automatically.