I have used rowspan in gridview asp.net. I have used this code.
For rowIndex As Integer = gvViewallOsId.Rows.Count - 2 To 0 Step -1
Dim gvRow As GridViewRow = gvViewallOsId.Rows(rowIndex)
Dim gvPreviousRow As GridViewRow = gvViewallOsId.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
I have attached excel files and i dispaly my gridview rowspan result. I want 3rd colomns user name datas display in single times. anybody if know pls help me.