Click here to Skip to main content
15,902,896 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi i am printing a table layout control, it has 3 rows and 4 columns,
Just like a table i want to write heading in the top row, and i want to merge the top row,
i want the table lay out look like this:


--------------------------
|HEADING ON MULTIPLE ROWS|
|- - - - - -|- - -- - - |
| | |
|---- ---- - | - - -- - |
| | |
| | |
| --- -- - - | - - - - --|
| | |
- - - - - - | - - - - -|

Any suggestion what can i add, i tried usng image, label etc but it fits in only one cell, not using two and three rows in the top column,
anyone can help me out plz,
Posted
Updated 26-Aug-11 19:51pm
v4

1 solution

use colspan="no of columns you want" in first row;
ex : colspan="4" in your case

<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="4">YOUR HEADING</td></tr>
<tr>
<td>content</td>
<td>content</td>
<td>content</td>
<td>content</td>
</tr>
<tr>
<td>content</td>
<td>content</td>
<td>content</td>
<td>content</td>
</tr>
<tr>
<td>content</td>
<td>content</td>
<td>content</td>
<td>content</td>
</tr>
</table>
 
Share this answer
 
v5
Comments
Db issues 27-Aug-11 3:23am    
thanks, this is fine and works well with web based language, i need help for visual studio, drag and drop tool
hitech_s 27-Aug-11 3:25am    
for drag and drop tool also u need to speicify the properties na..

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900