Click here to Skip to main content
16,017,852 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I having the Merging rows Command

VB
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

If i use Delete Command before the command(I). I want the Row Merging as I = II row.

Regards,
Nirmal.M
Posted
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900