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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted Oct 21, 2014, 9:26 AM EDT
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'.
VulpesRank #55 · 29.2K reputationPosted Oct 21, 2014, 9:58 AM EDT
GoGi FeboRank #4,008 · 372 reputationPosted Oct 21, 2014, 9:46 AM EDT
how to remowe questions?
GoGi FeboRank #4,008 · 372 reputationPosted Oct 21, 2014, 10:04 AM EDT
VulpesRank #55 · 29.2K reputationPosted Oct 21, 2014, 10:31 AM EDT
GoGi FeboRank #4,008 · 372 reputationPosted Oct 27, 2014, 3:38 AM EDT
VulpesRank #55 · 29.2K reputationPosted Oct 27, 2014, 5:43 AM EDT
I always hand-code everything as I like to have full control and to understand exactly what I'm doing.
GoGi FeboRank #4,008 · 372 reputationPosted Oct 27, 2014, 11:50 AM EDT
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, :) :).
VulpesRank #55 · 29.2K reputationPosted Oct 27, 2014, 1:20 PM EDT
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 FeboRank #4,008 · 372 reputationPosted Oct 27, 2014, 2:06 PM EDT
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.
VulpesRank #55 · 29.2K reputationPosted Oct 27, 2014, 3:29 PM EDT
There should be a link to any code which is generated by the database designer in there.
GoGi FeboRank #4,008 · 372 reputationPosted Oct 27, 2014, 3:54 PM EDT
GoGi FeboRank #4,008 · 372 reputationPosted Oct 27, 2014, 3:56 PM EDT