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 OriginalGriff 205
1 Sergey Alexandrovich Kryukov 185
2 jlopez788 109
3 Rob Philpott 100
4 Prakriti Goyal 97
0 OriginalGriff 6,837
1 Sergey Alexandrovich Kryukov 5,589
2 Maciej Los 3,479
3 Peter Leow 3,323
4 DamithSL 2,505


Advertise | Privacy | Mobile
Web04 | 2.8.140721.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