Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6069335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:48:42+00:00 2026-05-23T09:48:42+00:00

I have a tableLayoutPanel inside which i have added Panels dynamically— the name of

  • 0

I have a tableLayoutPanel inside which i have added Panels dynamically— the name of Panels are :

Panel1 ,
Panel2
.
.
.
.
.
.
.
.
.
.
.
Panel10

Now , in these dynamically added Panels , am adding some more controls dynamically such as :

In Panel1 : LabelDate1, LabelTime1, LabelPicAdder1, LinkLabel1

In Panel2 : LabelDate2, LabelTime2, LabelPicAdder2, LinkLabel2……

Now , on a button click, i want to change the values of the controls inside the Panel1, Panel2,
but if i do this :

foreach ( Control ctrl in this.tableLayoutPanel )

, i am ONLY able to get the Panels into ctrl variable,

but how to get the controls inside these Panels into some variable and change the TEXT property of those controls…..

I mean, how do i get the controls which are inside the Panels, which are themselves inside the tableLayoutPanel

TableLayoutPanel—->Dynamic Panels———–>Dynamic Controls –how to change the text property of this last object in the hierarchy

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T09:48:43+00:00Added an answer on May 23, 2026 at 9:48 am

    You added the control to the panels. So you have to iterate each panel:

    foreach ( Control panel in this.tableLayoutPanel ) {
        foreach ( Control ctrl in panel) {
            // etc..
        }
    }
    

    Odds are good that you can simplify your code by storing the control references when you create them instead of trying to find them back later.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have added controls dynamically on runtime inside the rows of a tableLayoutpanel ,
I have a TableLayoutPanel which holds a dynamic number of controls inside a SplitterPanel.
I have a TableLayoutPanel to which I add rows dynamically. Each row has an
I have a tablelayoutpanel. 2x2 - 2 columns 2 rows. For example, I added
I have a controls library which I've added a .resx file to (ImageResources.resx). It
I have several TableLayoutPanels, each of which displays a category of name/value information in
I generate controls for a TableLayoutPanel dynamically. I have a delete button in each
In VS2010, targeting Framework 4.0, I have a UserControl which contains a TableLayoutPanel with
I'm attempting to dynamically add both columns and rows to a TableLayoutPanel. I have
I have a series of nested TableLayoutPanel controls which each of them contains lots

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.