VB .net datagridview row span / merge (next row)

473 Views Asked by At

the first row has 4 columns when hit enter, all cols data will pushed down and filled the entire row. http://prntscr.com/dl6ytt

is there anyone can help me?

Here is my code:

If e.RowIndex = 1 AndAlso (e.ColumnIndex = 0) Then
            Using gridBrush As Brush = New SolidBrush(Me.dataEntry.GridColor), 
             backColorBrush As Brush = New SolidBrush(e.CellStyle.BackColor)
                Using gridLinePen As Pen = New Pen(gridBrush)
                     e.Graphics.FillRectangle(backColorBrush, e.CellBounds)
                     e.Graphics.DrawLine(gridLinePen, e.CellBounds.Left - 1,
                     e.CellBounds.Bottom - 1, 
                     e.CellBounds.Right - 1, e.CellBounds.Bottom - 1)
                     e.Graphics.DrawString(CType(e.Value, String), 
                    e.CellStyle.Font, Brushes.Black, 
                    e.CellBounds.X, e.CellBounds.Y)
                    e.Handled = True
                End Using
            End Using
        End If
0

There are 0 best solutions below