Click here to Skip to main content
11,639,861 members (59,978 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: ASP.NET HTML Tables
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 26-Apr-13 22:03pm
Edited 26-Apr-13 23:05pm
Sandeep Mewara at 27-Apr-13 5:57am
Cells can be anywhere, not clear on what you mean by merge them!
MJ MOUSAVI at 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.
Rohan Leuva at 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 If you wish to,then let me know.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1


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.
TableObject.Attributes.Add("colspan", yourValue);
TableObject.Attributes.Add("rowspan", yourValue);
Hope this helps...

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

  Print Answers RSS
0 Suvendu Shekhar Giri 330
1 CPallini 177
2 F-ES Sitecore 170
3 sasanka sekhar panda 155
4 142
0 OriginalGriff 9,081
1 Sergey Alexandrovich Kryukov 8,847
2 Mika Wendelius 7,027
3 Suvendu Shekhar Giri 2,650
4 F-ES Sitecore 2,558

Advertise | Privacy | Mobile
Web01 | 2.8.150731.1 | Last Updated 14 May 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100