i develop a win form in c#, and i created dynamic textbox and added to a datagridview column.now my problem is when i run the form textbox is placed at correct position, and when i maximize the form textbox is not added to the required column.here is my code
 
C#
  private void Former_Transactons_Load(object sender, EventArgs e)
        {
            TextBox tx1 = new TextBox();
            Rectangle rect = dataGridView1.GetCellDisplayRectangle(8, -1, true);
            rect.X = rect.Location.X + (rect.Width-22);
            rect.Y = 10;
            tx1.Size = new Size(20, 21);
            //tx1.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
            tx1.Location = rect.Location;
            dataGridView1.Controls.Add(tx1);
        }