Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

C# find a row by ID and add tablecell to it

Posted on 2009-05-13
4
Medium Priority
?
527 Views
Last Modified: 2012-06-27
The table and rows are already built.
Rows are assigned an ID.
I know what the ID is and want to add(tCell) to a specific row.
How do I reference a specific row so I can add a cell to it?
tCel.text = "howdy";
tRow.Cells.Add(tCel);

Open in new window

0
Comment
Question by:Chuck98RT10
  • 2
4 Comments
 
LVL 2

Expert Comment

by:phead_2
ID: 24379919
This is for a table web control right? How are you assigning the ID to the row?
0
 
LVL 20

Accepted Solution

by:
ddayx10 earned 2000 total points
ID: 24380392
pretty limited info, but I'll take a stab at it:

        foreach (TableRow r in tbl)
        {
            if(r.Cells[<INDEX OF YOUR ID CELL>] == <YOUR ID>)
            {//add your cell}
        }

Good Luck,

dday
0
 

Author Comment

by:Chuck98RT10
ID: 24380859
Nevermind. I think I figured it out. Thanks for replying.
0
 

Author Closing Comment

by:Chuck98RT10
ID: 31581211
Got it. Thanks
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question