locked
How to remove a control from specific row and column in tableLayoutPanel control ? RRS feed

  • Question

  • Hi
    i want to remove a control from specific cell in tableLayoutPanel control, but i didn't found any method which accomplish this. can anybody help me how to do this ?
    thanks in advance.
    http://www.codeproject.com/KB/codegen/DatabaseHelper.aspx
    • Moved by CoolDadTx Friday, February 12, 2010 1:47 PM Winforms related (From:Visual C# General)
    Friday, February 12, 2010 10:17 AM

Answers

  • Hi,

    try as follows:

    tableLayoutPanel1.Controls.Remove(tableLayoutPanel1.GetControlFromPosition(col, row));

    Best regards,
    Spontifixus :)
    Please mark the most helpful posts as answered - and don't forget to give helpful posters their credit :)
    • Proposed as answer by Spontifixus Friday, February 12, 2010 2:15 PM
    • Marked as answer by Hamed_1983 Friday, February 12, 2010 6:50 PM
    Friday, February 12, 2010 1:50 PM

All replies

  • Hi,

    try as follows:

    tableLayoutPanel1.Controls.Remove(tableLayoutPanel1.GetControlFromPosition(col, row));

    Best regards,
    Spontifixus :)
    Please mark the most helpful posts as answered - and don't forget to give helpful posters their credit :)
    • Proposed as answer by Spontifixus Friday, February 12, 2010 2:15 PM
    • Marked as answer by Hamed_1983 Friday, February 12, 2010 6:50 PM
    Friday, February 12, 2010 1:50 PM
  • Thanks Spontifixus
    http://www.codeproject.com/KB/codegen/DatabaseHelper.aspx
    Friday, February 12, 2010 6:51 PM