hi,
how to rowspan DataGridView in vb.net.
I tried the following code,but RowSpan error occured.
For i As Integer = DGGrid.Rows.Count - 1 To 1 Step -1
Dim row As DataGridViewRow = DGGrid.Rows(i)
Dim previousRow As DataGridViewRow = DGGrid.Rows(i - 1)
For j As Integer = 0 To row.Cells.Count - 1
If previousRow.Cells(j).RowSpan = 0 Then
If row.Cells(j).RowSpan = 0 Then
previousRow.Cells(j).RowSpan += 2
Else
previousRow.Cells(j).RowSpan = row.Cells(j).RowSpan + 1
End If
row.Cells(j).Visible = False
End If
Next
Next
Please help.
Sujeet SumanRank #790 · 2.9K reputationPosted Jul 1, 2015, 4:54 AM EDT
tin zar13 reputationPosted Jul 14, 2015, 5:23 PM EDT
I tried DataGridViewRow.
DataGridViewRow doesn't have rowSpan.
If you have other a good way, could you tell me?
Sujeet SumanRank #790 · 2.9K reputationPosted Jul 15, 2015, 3:29 AM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts