BootstrapGridView.CustomCellMerge Event

Allows you to merge grid cells manually.

Namespace: DevExpress.Web.Bootstrap

Assembly: DevExpress.Web.Bootstrap.v19.2.dll

Declaration

public event BootstrapGridViewCustomCellMergeEventHandler CustomCellMerge
Public Event CustomCellMerge As BootstrapGridViewCustomCellMergeEventHandler

Event Data

The CustomCellMerge event handler receives an argument of the BootstrapGridViewCustomCellMergeEventArgs type. The following properties provide information specific to this event.

Property Description
Column
Handled Specifies if merging of the currently processed cells is handled manually, so no default processing is required.
Merge Specifies if the currently processed cells should be merged.
RowVisibleIndex1 Gets the visible index of the row that contains the first cell currently being processed.
RowVisibleIndex2 Gets the visible index of the row that contains the second cell currently being processed.
Value1 Gets the value of the first cell currently being processed.
Value2 Gets the value of the second cell currently being processed.

Remarks

When cell merging is allowed (by the ASPxGridViewBehaviorSettings.AllowCellMerge or GridViewDataColumnSettings.AllowCellMerge property), the grid automatically merges adjacent cells with the same values.

In this case, you can handle the CustomCellMerge event to implement cell merging manually.

Note
  • The pairs of cells are processed randomly.
  • The event handler won't process neighbor cells indexes one after another as this event can fire not only for adjacent pairs of cells in a column.

The event argument properties provide information about the processed column (Column), visible index of the rows that contain the processed cells (RowVisibleIndex1 and RowVisibleIndex2), and their values (Value1 and Value2).

To provide custom merging logic, set the Handled property to true and use the Merge property to specify if the currently processed cells should be merged. If the cells are merged, the resulting cell value is equal to Value1.

See Also