Solved

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

Posted on 2009-05-13
4
520 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 500 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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

623 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