Click here to Skip to main content
15,888,301 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
For Example i want to have my header as the following.

HTML
|       Header Column           |      Header Column2      |
|apple|Microsoft|Android|Dell|HP|Targus|Stack Overflow|Acer|



My VB Code to add a column is the following:

VB
Dim dt As New DataTable
dt.Clear()
    dt.Columns.Add("apple")
    dt.Columns.Add("Microsoft")
Dim mr As DataRow
    mr = dt.NewRow
    mr("apple") = "Macbook"
    mr("Microsoft") = "Surface Pro"
dt.Rows.Add(mr)
GridView1.DataSource = dt
GridView1.DataBind()


What I have tried:

stackoverflow. But i want to use my code to do this.
Posted
Comments
Sergey Alexandrovich Kryukov 10-May-16 14:09pm    
Please read carefully: What have you tried so far?
Your code is unrelated to your problem. The layout you want is quite reasonable, but it's far from default, needs some thinking/work. Probably, you need raw HTML table element created from scratch.
—SA

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