Click here to Skip to main content
15,881,139 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need a div with a table in it that contains 100 row and 50 columns in it.It can be static. and it is not important to be html or asp component.
Now i want to be able to merge cells that in run time are selected by me.
How can i do that?
Thanks in advanced.
Posted
Updated 26-Apr-13 23:05pm
v2
Comments
Sandeep Mewara 27-Apr-13 5:57am    
Cells can be anywhere, not clear on what you mean by merge them!
MJ MOUSAVI 27-Apr-13 5:59am    
There is a table in asp page. i want to select some cells and then merge those cells with each other in run time.
Thanks7872 27-Apr-13 6:29am    
As per as i understand your question,you want to merge cells with same values right?if so,then you can make use of gridview instead of table in asp.net. If you wish to,then let me know.

1 solution

Hi,

You may have to make the table a server element by specifying the 'Id' and the runat="server" attributes. After that based on your logic you can make use of the following to add either a colspan or a rowspan to merge the cells / rows.
C#
TableObject.Attributes.Add("colspan", yourValue);
TableObject.Attributes.Add("rowspan", yourValue);

Hope this helps...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900