0

here are my example cells

enter image description here

it should be like this one

enter image description here

here is my code for filling my data grid

    con.Open()
    Dim query As String = "select * from tbllogin"
    Dim cmd As New SqlCommand(query, con)
    Dim rd As SqlDataReader
    rd = cmd.ExecuteReader

    DGV.Columns.Clear()
    DGV.Rows.Clear()

    DGV.Columns.Add("col1", "UserName")
    DGV.Columns.Add("col2", "Password")

    While rd.Read
        DGV.Rows.Add(rd("UserName").ToString, rd("Password").ToString)
    End While

    rd.Close()
    con.Close()
har07
  • 88,338
  • 12
  • 84
  • 137
user3349878
  • 11
  • 1
  • 2
  • 5

1 Answers1

0

There is no simple way to merge cells in DataGridView. You need to manually alter the way the grid painted and that is not a fun work :(

Some questions already asked addressing similar requirement :

Community
  • 1
  • 1
har07
  • 88,338
  • 12
  • 84
  • 137