Private Sub LoadData()
' add columns.
For i As Integer = 1 To 8
grid.ColumnsHierarchy.Items.Add("Column " & i)
Next i
' add rows.
For i As Integer = 1 To 25
grid.RowsHierarchy.Items.Add("Row " & i)
Next i

The MergeCells method will lllustrate how to merge grid cells by using the SetCellSpan method. When you use the SetCellSpan method, you need to pass four parameters to it - row, column, rows span and columns span. In the method we will merge cells in the first and second rows and we will also set custom visual style to the merged cells.