[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 528
  • Last Modified:

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

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
Chuck98RT10
Asked:
Chuck98RT10
  • 2
1 Solution
 
phead_2Commented:
This is for a table web control right? How are you assigning the ID to the row?
0
 
ddayx10Commented:
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
 
Chuck98RT10Author Commented:
Nevermind. I think I figured it out. Thanks for replying.
0
 
Chuck98RT10Author Commented:
Got it. Thanks
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now