I want to display row number in column0 of gridview with condition if column1 = "" do nothing and start count form 1 again
col0 col1
1      a
2      a
3      a
4      a
1      
2      a      
1      
2      a
3      a
4      a
    Private Sub GridView1_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GridView1.RowDataBound
        Dim m As Integer
        If e.Row.Cells(1).Text = "" Then
            m = e.Row.RowIndex + 1
        Else
            e.Row.Cells(0).Text = (i + 1 - m).ToString
        End If
        If e.Row.Cells(0).Text = "0" Or e.Row.Cells(0).Text = "-1" Then
            e.Row.Cells(0).Text = ""
        End If
   End Sub