Click here to Skip to main content
12,066,626 members (56,477 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: ASP.NET HTML table
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 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.
Rohan Leuva 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
Top Experts
Last 24hrsThis month


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