Convert Tabular data to Columnar data...

Do you know if there are any classes in the .NET framework that help you convert from tabular data to columnar data....crosstab something?

You learn from experience, everything else is just information.
2/14/2008 1:10:02 PM 91979 articles. 4 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 29

you mean 1 2 3 (in first line) 4 5 6 (in second line) to be converted to 1 2 3 4 5 6 like this?

"Mark as Answer" the post which helped you in solving your problem
2/14/2008 1:30:56 PM


If the desciption from bnarasimha is what you need, you can follow the below codes.

Code Behind:

    private void tabularTocolumnar()
        HtmlTable tb = table1;
        int rowscount = table1.Rows.Count;

        Table tbl = new Table();
        TableRow headrow = new TableRow();
        for (int i = 0; i < rowscount; i++)
            HtmlTableCellCollection tcs = tb.Rows[i].Cells;

            for (int n = 0; n < tcs.Count; n++)
                TableCell headdate = new TableCell();
                headdate.Text = tcs[n].InnerText;


        <table id="table1" runat="server">

Hope it helps.


Vince Xu
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
2/18/2008 3:05:43 AM

Similar Artilces:

data, data, data
Hello, I need some advice on the best method to keep a database updated in this scenario. I have a local Solomon SQL Server where we keep our inventory. I want to build an application that will be hosted at a remote hosting location which provides a SQL database. I want to build the application to allow clients to access the inventory items and make requests based on the remote SQL data. The order will be sent to our fulfillment department via email; they will fiill the request and ship.  I'm not sure the method to do this while keeping the data current on the remote and the l...

How to get data from data base and display it in data grid
 hi,am having a connection to data base and now what i want is , how can i display the data from database and display it in my data grid.any sample code of 2 or 3 lines can be of great help. i know how do i get data for a drop down from data base  as below.List<CRoleBE> roleList = roleInterface.GetAllRoles();ddlBaseRole.Items.Add(new ListItem("Select any Role", "-1"));foreach (CRoleBE businessEntity in roleList){    ListItem item = new ListItem(businessEntity.Name, businessEntity.ID.ToString());    ddlBaseRole.Items.Add(i...

Data or Data
I pronounce it "data". HTH I pronounce it dAta and data. Depends upon my mood and the context it's in. Like I preserve dAta, but i lose data. :P Matthew wrote: > I pronounce it dAta and data. Depends upon my mood and the context it's > in. Like I preserve dAta, but i lose data. :P Lt Commander D "ay" ta. Nuff said. In fact he corrected Dr Pulaski when she called him D "ah" ta. D ay ta, d ah ta, what's the difference? One is my name... the other is not. :) <-geek > > Lt Commander D "ay&quo...

Data Data :|
Ok, i have a very simple access database called score with just one table called high. This is just going to be used to keep the current score of a higher scorer and there name However, when the page loads i want the user to see this current high score and the persons name, but just one record i only ever want this to hold one record aswell..When the user finish’s the game there score is currently presented to them, when this happens i would like to connect to the database and check weather there score is higher than the current score (may have changed since they loaded page...

get data from Datagridview(gets data from SqlDataSource1)
 I got data from database into my datagridview via sqlDatasource1 i.e by using given tools, no programming et all.I want to access rows of each Gridview row separately and then show them in textboxes of my own choice, instead of in gridview. How can I do that? It works numberOfRows = datagridview.Rows.Count;but following doesn'ttextbox1.Text=datagridview.Rows[0].cells[1].Text;Dont know why it doesn;t?Then I tried to get data of this gridview to another but it didn;t work too.Help me plzzz.....I m stuck hereRegards,Mohsin Can you please post your GridView code? I have some cod...

Need to get whole data from data grid view into data table
Hi I have one gridview. which have some textboxes and some are data boud columns. I want to fetch whole the data in the gridview into one data set or datatable.And then insert that dataset or datatable into one other database table. Is there any way to do that. Please reply as soon as possible at and  regards Ashish Gautam Hi,Can you check this article helps you becoz they took data input from gridview control and insert into the database then display it again. p...

Getting data from data columns
 for now if i want to say retrive a field from a row, i use 1 SQLDataSource, 1 GridViewThen in the code it will be like Dim temp as String = GridView.Rows(0),Cells(5).Text, works but i need quite alot of redundant controls isit? how do i do it with say just 1 SQLDataSource or something else, classic ASP with SQL code, is a bit complex sometimes, although if thats the only way i don't mind, but state how to do it? i get quite blur when it comes to ASP with SQL, they by itself is still ok. Hello my friend, The SQLDataSource is good for simple get and display, but when you need to i...

Get Data From The Data Grid
Hi ...I tried to get the data from the data grid where the column is visible=false when edit the datagrid to do tht ???I tried Dim a as string = e.item.cells(1).text, but the result is ""hope to receive your reply.thank you very much :)   Cheers,Cherie In Edit mode event hidden column contains the textbox with the text in it if you are using the BoundColumn. Try accessing that textbox Cheers Bug [MCSD] FYI, if you are using BoundColumnDim a as String = CType(e.Item.Cells(1).Controls(0),TextBox).Text TemplateColumnDim a as String = CType(e.Item.Cells(1...

Get Data from Data Grid
I have a gridview with one column and select enabled, I want to get the data from the selected row's column into a string. This should be fairly simple however I'ts not something that has been easy to find reference to.  You can get the value using this code   protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)    {        string strData = GridView1.SelectedRow.Cells[1].Text;    } You need to decide in which event of grid u want the value  Don't say thanks rathe...

Where should I start if I want to make a new Address book data source to get data from an obdc database?
Where should I start if I want to make a new Address book data source to get data from an obdc database? ...

How to convert varchar data type into datetime data type without data lose
Hi all, i have stored date as varchar(30) data type and Date format is dd/MM/yyyy now i have to convert it into datatime data type can u help me in query ?  i have 330 records and each recod contain the Date in format of dd/MM/YYYY but due to varchar data type i can not perform calculation on Date so i have to convert into datetime without data lose. please help me in this regard. Best RegardsRameezWaheed  life is name of learning!Mark as an answer if it helps You can check these posts   ...

Data Connection has no data in the data grid???
I have a data connection that I use to create a data set and I bind the data set to a data grid, but when I run the page no data or grid appears... I know there is data in the table that the data connection attaches to. Please review my code below and offer suggestions why my data grid is empty. Thanks,Ryan<%@ Page Language="C#" %><%@ Register TagPrefix="wmx" Namespace="Microsoft.Matrix.Framework.Web.UI" Assembly="Microsoft.Matrix.Framework, Version=, Culture=neutral, PublicKeyToken=6f763c9966660626" %><%@ import Namespace="System.Data" %><%@ import Namespace...

How to get data from an Object data source?
Hi I am new to data source controls and I have a basic query...I am using following code to show some results in a GridView with custom pagination.<asp:ObjectDataSource ID="objectDataSourceSearch" runat="server" EnablePaging="True"              SelectMethod="Select" TypeName="GoogleSearchDatasource" SelectCountMethod="SelectCount"             OnSelecting="objectDataSourceSearch_Selecting" >  &...

Convert Gridview Data in to PDf file. or Convert report data in pdf file
 Hi have problem to convert Gridview data into PDF file..let me know is there any solution or open source components..Regards Rambhopal Reddy EPlease remember to click “Mark as Answer” on the post that helps you, and to click “Unmark asAnswer” if a marked post does not actually answer your question. Friend, Check this thread for soultions and then to   Good luck!     Please Don't forget to click "Mark as Answer" on the post that helped you.This can be benef...

Web resources about - Convert Tabular data to Columnar data... -

Stratified columnar epithelium - Wikipedia, the free encyclopedia
Stratified columnar epithelia is a rare type of epithelial tissue composed of column shaped cells arranged in multiple layers. Stratified columnar ...

Data warehouse appliances and columnar DBMS
When I listed 5 data management technologies you probably should know more about , two of them were data warehouse appliances and columnar DBMS. ...

Columnar kitchen from Clei has a tiny footprint
If you don't have the room to go out, you can always go up, as Massimo Facchinetti does with this amazing kitchen.

Precambrian Columnar Stromatolite Diversity: Reflection of Metazoan Appearance
© 2012 American Association for the Advancement of Science. All Rights Reserved . AAAS is a partner of HINARI , AGORA , OARE , PatientInform ...

Carcinoma of the Anus: Strategies in Management
Carcinoma of the Anus: Strategies in Management

Selection List of Common Tree Species
Note: evergreens should not be planted close to walkways, streets, or buildings because of their broad base that will become an obstruction as ...

1STDIBS.COM - Antique, Mid-century, Modern, Vintage Furniture and Lighting - Searching Other Categories ...
1stdibs - The most beautiful things on Earth. 1stdibs is the world's most searched market place for antique and mid-century modern furniture. ...

SAP: Bernstein Elaborates on ‘Hana’ Promise
... database, without any indexes, in memory. To further leverage multi- processing and large volumes of memory they use what is called a columnar ...

Gray, Henry. 1918. Anatomy of the Human Body. Page 1029
Gray, Henry. 1918. Anatomy of the Human Body.

The Best Small Trees
... with crabapples. There's a wonderful array available that bears flowers in shades of white, pink, and red; has weeping, rounded, or columnar ...

Resources last updated: 1/19/2016 6:24:18 PM