eladreznik 0 Newbie Poster

I would like to insert my panel at the top, when I do so now the dgv will cover half of the panel, how do I solve that?

Private Sub grdSize()
   Me.grdAccountTypes.Width = 0
       Me.grdAccountTypes.Height = 0
        For Each column As DataGridViewColumn In Me.grdAccountTypes.Columns
            Me.grdAccountTypes.Width += column.Width
        Next
        Me.grdAccountTypes.Width += Me.grdAccountTypes.RowHeadersWidth
        For Each Rows As DataGridViewRow In Me.grdAccountTypes.Rows
            Me.grdAccountTypes.Height += Rows.Height + 1.55
        Next
        Me.grdAccountTypes.Height += Me.grdAccountTypes.ColumnHeadersHeight
    End Sub
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.