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

  • SEARCH
  • Home
  • 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 7073759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:58:05+00:00 2026-05-28T05:58:05+00:00

In the an application I’m working on it should be possible to dynamically add

  • 0

In the an application I’m working on it should be possible to dynamically add numbers to cells in a table. The user types for example nr 1, and then the number should increment by 1 in each cell (eg. cell1 = 1, cell2 = 2, cell3 = 3 and so on).

I guess I can use either a for-loop or a for-each loop, but what I need to know is how to step through the cells and adding new content to each of them?

By the way. I am using the Table Control (not “pure HTML”), and the table contains of 7 rows and two cols. I want it to loop through the cells as following:


: 1 : 2 :

: 3 : 4 :

: 5 : 6 :

and so on…

  • 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-28T05:58:06+00:00Added an answer on May 28, 2026 at 5:58 am

    A foreach like like this should do the trick:

    int yourStartInt = 6;
    
    foreach(Control control in YourTableID.Controls)
    {
        if (control is TableRow)
        {
            foreach (Control innerControl in control.Controls)
            {
                if (innerControl != null && innerControl is TableCell)
                {
                    TableCell cell = innerControl as TableCell;
                    cell.Text = yourStartInt.ToString();
                    yourStartInt++;
                }
            }
        }
    }
    

    You must loop through your table’s controls to find the rows, and then in the rows you can find the cells in similar fashion.

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

Sidebar

Related Questions

Application[temp] = 8; should set the value 8 to the key temp . However,
My application dynamically loads assemblies at runtime from specific subfolders. These assemblies are compiled
Application : I am working on one mid-large size application which will be used
Application: This is a workshop proposal system for a conference. A user can create
My application now needs to create and then write files to a temp directory
The application crashes on the row: [uids addObject:user.uid]; Who can tell why??
APPLICATION DESCRIPTION : I am a new iPhone developer. I am working on an
Application has a tabhost managed through TabActivity. It has option to add tabs at
My application was running fine until i added the following code to add an
Application Settings.bundle contains a version number , which is automatically generated during build. From

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.