Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Java
Expertise: Advanced
Oct 24, 2006

Placing Multiple Headers in a DataTable

A DataTable can only handle one header for each column. The workaround for this is to use two tables. Generate the first table at the same time as the DataTable and the other one using HTML. The HTML table will contain the headers, however many you desire.

Next, align the columns from the two tables using CSS. For each column, create a class style and specify the width:


DIV.columnX{
  background: none;
  width: 95px;
  text-align: left; 
}
This looks fine on all browsers.

Adrian Pascut
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap