For rowIndex As Integer = GridView01.Rows.Count - 2 To 0 Step -1 Dim gvRow As GridViewRow = GridView01.Rows(rowIndex) Dim gvPreviousRow As GridViewRow = GridView01.Rows(rowIndex + 1) For cellCount As Integer = 0 To gvRow.Cells.Count - 1 If gvRow.Cells(cellCount).Text = gvPreviousRow.Cells(cellCount).Text Then If gvPreviousRow.Cells(cellCount).RowSpan < 2 Then gvRow.Cells(cellCount).RowSpan = 2 Else gvRow.Cells(cellCount).RowSpan = gvPreviousRow.Cells(cellCount).RowSpan + 1 End If gvPreviousRow.Cells(cellCount).Visible = False End If Next Next
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)