|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Datatable : partial copy and columns reordering ?Hello.
I am writing a program that : 1. create a DataTable 2. reads a .csv text file (not created by me) and fills that DataTable 3. from that DataTable, must suppress some columns and must reorder some others Question : as I do not see how to do the third point above (rearranging a DataTable), can someone gives me some advices ? Thank you in advance. jean-marie Ok.
I found it using DataTable.Merge(...) method jmd Show quote "jmd.msdn" <jmd.msdn@newsgroup.nospam> wrote in message news:expBMVWnGHA.1244@TK2MSFTNGP05.phx.gbl... > Hello. > I am writing a program that : > 1. create a DataTable > 2. reads a .csv text file (not created by me) and fills that DataTable > 3. from that DataTable, must suppress some columns and must reorder > some others > > Question : as I do not see how to do the third point above (rearranging a > DataTable), can someone gives me some advices ? > > Thank you in advance. > jean-marie > > Jean Marie,
I did not see your problem. Have a look at this. http://www.vb-tips.com/default.aspx?ID=1b644f6b-aa01-49f6-bc1f-212f9e0de193 To rearange a datatable in Net 2.0 you can use the new overloaded version of the Dataview to create a new table. http://msdn2.microsoft.com/en-us/library/wec2b2e6.aspx For 1.x there is a method on our website. I hope this helps, Cor Show quote "jmd.msdn" <jmd.msdn@newsgroup.nospam> schreef in bericht news:expBMVWnGHA.1244@TK2MSFTNGP05.phx.gbl... > Hello. > I am writing a program that : > 1. create a DataTable > 2. reads a .csv text file (not created by me) and fills that DataTable > 3. from that DataTable, must suppress some columns and must reorder > some others > > Question : as I do not see how to do the third point above (rearranging a > DataTable), can someone gives me some advices ? > > Thank you in advance. > jean-marie > > Oh..
I did not see DataView.ToTable(..) => I will have a look at it But I finally found DataTable.Merge(..) which is exactly what I want. Thank you jean-marie Show quote "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message news:OGAWinhnGHA.2364@TK2MSFTNGP02.phx.gbl... > Jean Marie, > > I did not see your problem. > > Have a look at this. > http://www.vb-tips.com/default.aspx?ID=1b644f6b-aa01-49f6-bc1f-212f9e0de193 > > To rearange a datatable in Net 2.0 you can use the new overloaded version > of the Dataview to create a new table. > http://msdn2.microsoft.com/en-us/library/wec2b2e6.aspx > > For 1.x there is a method on our website. > > I hope this helps, > > Cor > > "jmd.msdn" <jmd.msdn@newsgroup.nospam> schreef in bericht > news:expBMVWnGHA.1244@TK2MSFTNGP05.phx.gbl... >> Hello. >> I am writing a program that : >> 1. create a DataTable >> 2. reads a .csv text file (not created by me) and fills that DataTable >> 3. from that DataTable, must suppress some columns and must reorder >> some others >> >> Question : as I do not see how to do the third point above (rearranging a >> DataTable), can someone gives me some advices ? >> >> Thank you in advance. >> jean-marie >> >> > > |
|||||||||||||||||||||||