Solved

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

Posted on 2009-05-13
4
479 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 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

746 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now