Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

ASP.NET thead create table with thead using code behind

Posted on 2013-02-01
2
1,970 Views
Last Modified: 2013-02-04
using my existing code below how can i incorp thead

<table><thead><tr><td></td></tr></table>

 
Dim c As New TableCell
            Dim r As New TableRow
            Dim D As New TableRow

 c = New TableCell
                c.Text = "te"
                r.Style.Add("text-align", "center")
                c.Style.Add("width", "70px")
                c.Style.Add("border-bottom", "black 1px solid")
                r.Cells.Add(c)

                c = New TableCell
                c.Text = "Item"
                r.Style.Add("text-align", "center")
                c.Style.Add("width", "40px")
                c.Style.Add("border-bottom", "black 1px solid")
                'c.ColumnSpan = 3
                r.Cells.Add(c)
 Trade.Rows.Add(r)

Open in new window

0
Comment
Question by:sevensnake77
2 Comments
 
LVL 6

Accepted Solution

by:
esolve earned 500 total points
ID: 38846296
Look at this:

http://www.thebestdata.com/zoom.htm?menutype=1&auto=2362
http://forums.asp.net/t/1182775.aspx/1
TableRow row = new TableHeaderRow();
        TableRow row2 = new TableRow();
        TableRow row3 = new TableFooterRow();
        Table table = new Table();

        var cell1 = new TableCell();
        row.TableSection = TableRowSection.TableHeader;
        cell1.Text = "Header";
        row.Cells.Add(cell1);

        var cell2 = new TableCell();
        cell2.Text = "Contents";
        row2.Cells.Add(cell2);

        var cell3 = new TableCell();
        cell3.Text = "Footer";
        row3.Cells.Add(cell3);
        row3.TableSection = TableRowSection.TableFooter;


        table.Rows.Add(row);
        table.Rows.Add(row2);
        table.Rows.Add(row3);
        this.Controls.Add(table);

Open in new window

0
 
LVL 9

Author Closing Comment

by:sevensnake77
ID: 38851577
tks
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question