Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
I want to merge table cells because i want to display the heading of the table is nearly together how to do it in asp.net
 
Please help
 
Thanks in advance
 
Happy Christmas and Happy New year all of you
Posted 25-Dec-11 21:59pm
devausha1.4K
Comments
Uma Shankar Patel at 26-Dec-11 4:03am
   
same to you.......
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

hi frnd,
 
you can use below example for merge 2 cell:
 
For HTML
 
<table>
     <tr>
        <td colspan="2">
        merge Cell Display header here
        </td>
     </tr>
     <tr>
       <td>Cell 1</td>
       <td> Cell2</td>
     </tr>
   </table>
 
ColSpan: if you want to merge N Cells then Colspan Attribute value = N ie. for merge 10 cells, ColSpan attribute value = 10.
 
For ASP.net Table Control
 
 <asp:table runat="server" xmlns:asp="#unknown">
     <asp:tablerow>
        <asp:tablecell columnspan="2">
        
          Merge cell : display Header here
        </asp:tablecell>
     </asp:tablerow>
     <asp:tablerow>
       <asp:tablecell>Cell1</asp:tablecell>
       <asp:tablecell>Cell2</asp:tablecell>
     </asp:tablerow>
   </asp:table>
 
here we have ColumnSpan attribute for merge the cells
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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

Solution 2

Uses rowspan tag, you can do it.and You can try this url....................http://www.hscripts.com/tutorials/html/rowspan.php[^]
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

<table>
     <tr>
        <td colspan="2">
        merge Cell Display header here
        </td>
     </tr>
     <tr>
       <td>Cell 1</td>
       <td> Cell2</td>
     </tr>
   </table>
  Permalink  

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

  Print Answers RSS
0 CPallini 350
1 Sergey Alexandrovich Kryukov 320
2 BillWoodruff 309
3 George Jonsson 274
4 OriginalGriff 237
0 OriginalGriff 4,903
1 CPallini 3,960
2 Sergey Alexandrovich Kryukov 3,474
3 George Jonsson 2,786
4 Gihan Liyanage 2,386


Advertise | Privacy | Mobile
Web02 | 2.8.140905.1 | Last Updated 23 Apr 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