troubleshooting Question

how do I effect checkboxes in dynamic table?

Avatar of kobibass
kobibass asked on
C#ASP.NET
6 Comments1 Solution650 ViewsLast Modified:
I need to be able to modify checkboxes which made on dynamic table. do I need to change the code and declare them as global array? or is there easy way to check or uncheck each of them?

the way I make the checkboxes is:
for (cellCtr = 0; cellCtr <= MAX_COL_DEF; cellCtr++)
            {
                // create Checkboxes
                if (cellCtr == 0)
                {
                    TableRow cbRow = new TableRow();
                    Table1.Rows.Add(cbRow);
                    // Create a new cell and add it to the row.
                    tCell = new TableCell();
                    CheckBox dbCheckBox = new CheckBox();
                    dbCheckBox.Visible = true;
                    tCell.Controls.Add(dbCheckBox);
                    tRow.Cells.Add(tCell);
                }
         .
         .
       }


I added decleration of the tcell to the behind code:
<asp:CheckBox ID="tCell" runat="server" Visible=true AutoPostBack=true />

Please write me detailed answer, I'm quite new to asp.net.
thanks.
Kobi.
ASKER CERTIFIED SOLUTION
TheAvenger

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros