• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 590
  • Last Modified:

Merge Cells in Table Control

Hello,

I'm creating Table (With rows and cells) dynamically in a web custom control like this:

Table Tab = new Table();
TableRow Row1 = new TableRow();
TableCell Cella = new TableCell();
TableCell Cellb = new TableCell();
Cella.Controls.Add(TextBox1);
Cellb.Controls.Add(TextBox2);
Row1.Controls.Add(Cella);
Row1.Controls.Add(Cellb);                  
Tab.Controls.Add(Row1) ;
Controls.Add(Tab) ;

How can I merge the two cells in the row?

Thanks
Praveen
0
praveenuni
Asked:
praveenuni
2 Solutions
 
nouloukCommented:
Hi, you can use:
Cella.ColumnSpan=2

Hope this helps.
0
 
raterusCommented:
Also ensure that you aren't adding the second cell if you use columnspan.
0
 
praveenuniAuthor Commented:
Thank you that helped!
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.

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