convert record into column header
Hi, clueless novice asks for help. How to 10 records from table A turn into 10 columns headers into table B??? c#
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Oct 21, 2014, 1:26 PM
for(int i = 0; i < 10; i++)
{
string colName = A.Rows[i]["Headings"].ToString();
B.Columns.Add(colName);
for(int i = 0; i < 10; i++)
{
string colName = A.Rows[i]["Headings"].ToString();
B.Columns.Add(colName);
}
}
PS To keep things tidy, can you delete your two duplicate posts please as no one can answer them anyway because they're 'Closed'.
GoGi FeboPosted Oct 27, 2014, 7:56 PM
GoGi FeboPosted Oct 27, 2014, 7:54 PM
VulpesPosted Oct 27, 2014, 7:29 PM
There should be a link to any code which is generated by the database designer in there.
GoGi FeboPosted Oct 27, 2014, 6:06 PM
Delphi has the environment like VS in 1995. I want to learn thoroughly , and gave myself some things that I've done before.
The problem I have is relation but for these things I use the designer in VS. I wonder how that code that he make changes or get out.
VulpesPosted Oct 27, 2014, 5:20 PM
As far as relations between DataTables are concerned, it's not too difficult to construct and navigate these in code.
The DataRelation class has constructors which enable you to create a parent/child relationship between two tables. You can create as many of these as you like and then add them to the DataSet's Relations property which then enables you to navigate from one table to another.
This link may help to get you started with this:
http://msdn.microsoft.com/en-us/library/d6s958d6(v=vs.110).aspx
GoGi FeboPosted Oct 27, 2014, 3:50 PM
I know my questions sometimes seems extremely stupid and weird , but I suffer and am trying to learn the basics of C# and then....... sky isn't limit, :) :).
VulpesPosted Oct 27, 2014, 9:43 AM
I always hand-code everything as I like to have full control and to understand exactly what I'm doing.
GoGi FeboPosted Oct 27, 2014, 7:38 AM
VulpesPosted Oct 21, 2014, 2:31 PM
GoGi FeboPosted Oct 21, 2014, 2:04 PM
VulpesPosted Oct 21, 2014, 1:58 PM
GoGi FeboPosted Oct 21, 2014, 1:46 PM
how to remowe questions?