Click here to Skip to main content
Rate this: bad
good
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 23:03pm
Edited 27-Apr-13 0:05am
v2
Comments
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 asp.net. If you wish to,then let me know.

1 solution

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

Solution 1

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

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

  Print Answers RSS
0 OriginalGriff 325
1 DamithSL 265
2 CPallini 235
3 Maciej Los 190
4 Sergey Alexandrovich Kryukov 189
0 OriginalGriff 5,455
1 DamithSL 4,422
2 Maciej Los 3,860
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,010


Advertise | Privacy | Mobile
Web02 | 2.8.141216.1 | Last Updated 14 May 2013
Copyright © CodeProject, 1999-2014
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