Invalidating and updating

Wpf GridControl provides two sets of internal content update methods. They are invalidation and update methods. Examples: Cell.Update() / Cell.Invalidate() or Row.Update() / Row.Invalidate(). The main difference between these methods is that Invalidate methods update text in a grid cell or in cells of a single row. In other words, DataTemplate that display content of a specific cell get a notification to update graphical content. Meanwhile, Update methods inform GridControl that a cell value has changed and that the grid has to check cell filtering, grouping and blinking conditions and to move a row to required position if sorting is used. Let's note that Cell.Update() method is indirectly called on notification from INotifyPropertyChanged or IBindingList interfaces.

Headers and columns contain only Invalidate methods that request column or cell content update without impact on internal content position in the grid.

Dapfor Wpf GridControl invalidation

A list of elements that can be invalidated or updated is presented below:

ElementDescription
Cell.Invalidate()requests DataTemplate that displays current cell to update content.
Cell.Update()notifies GridControl of cell data change. After synchronization with the main thread the grid checks the following conditions (if necessary): filteringsortinggrouping. If cell blinking is permitted (property GridControl.SettingsBlinking.Enabled), the cell is blinked for time interval specified in GridControl.SettingsBlinking.
Row.Invalidate()requests Row to update contents of all contained cells.
Row.Update()notifies GridControl that data in Row has changed. After synchronization with the main thread the grid checks the following conditions (if necessary): filteringsortinggrouping.
Column.Invalidate()Request to update column title content.
Column.InvalidateCells()Request to update content of all Cell in a column. Content is not moved or checked for filtering or grouping.
Header.Invalidate()Request to update contents of all columns.
Header.InvalidateRows()Request to update content of all Row located at the same hierarchy level as Header. Content is not moved or checked for filtering or grouping.

Back to Wpf GridControl features