Click here to Skip to main content
11,715,425 members (79,394 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 Sergey Alexandrovich Kryukov 485
1 Richard MacCutchan 275
2 Maciej Los 259
3 ManasKumarM 155
4 Frankie-C 125
0 Sergey Alexandrovich Kryukov 785
1 CHill60 415
2 Richard MacCutchan 405
3 Maciej Los 389
4 OriginalGriff 320

Advertise | Privacy | Mobile
Web02 | 2.8.150901.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