From datatable to xaml table documentHello<br/> <br/> Is there a simple way to convert the content of a datatable in a xaml table?© 2009 Microsoft Corporation. All rights reserved.Thu, 09 Jul 2009 09:49:04 Z04e39d80-85bc-48bf-8462-8ccaa3c8e503http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/04e39d80-85bc-48bf-8462-8ccaa3c8e503#04e39d80-85bc-48bf-8462-8ccaa3c8e503http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/04e39d80-85bc-48bf-8462-8ccaa3c8e503#04e39d80-85bc-48bf-8462-8ccaa3c8e503marck68http://social.msdn.microsoft.com/Profile/en-US/?user=marck68From datatable to xaml table documentHello<br/> <br/> Is there a simple way to convert the content of a datatable in a xaml table?Fri, 03 Jul 2009 06:04:02 Z2009-07-03T06:11:20Zhttp://social.msdn.microsoft.com/Forums/en-US/wpf/thread/04e39d80-85bc-48bf-8462-8ccaa3c8e503#839dff90-5bae-4716-b540-ccb794c515b6http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/04e39d80-85bc-48bf-8462-8ccaa3c8e503#839dff90-5bae-4716-b540-ccb794c515b6Myexphttp://social.msdn.microsoft.com/Profile/en-US/?user=MyexpFrom datatable to xaml table documentHi, Do you want to show the datatable data as table on the window? <a href="http://msdn.microsoft.com/en-us/library/ms750416.aspx">http://msdn.microsoft.com/en-us/library/ms750416.aspx</a><br/>You can not expect datatable to generate the code, it can only generate xml code once you call WriteXml method.<hr class="sig">ExperienceFri, 03 Jul 2009 09:41:01 Z2009-07-03T09:41:01Zhttp://social.msdn.microsoft.com/Forums/en-US/wpf/thread/04e39d80-85bc-48bf-8462-8ccaa3c8e503#1b1330c6-7d6f-4e76-9e0c-68a50319ac44http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/04e39d80-85bc-48bf-8462-8ccaa3c8e503#1b1330c6-7d6f-4e76-9e0c-68a50319ac44marck68http://social.msdn.microsoft.com/Profile/en-US/?user=marck68From datatable to xaml table documentwell actually i was expecting to get the table directly from the datatableFri, 03 Jul 2009 13:38:28 Z2009-07-03T13:38:28Zhttp://social.msdn.microsoft.com/Forums/en-US/wpf/thread/04e39d80-85bc-48bf-8462-8ccaa3c8e503#b59f6112-8224-4406-8e2c-6011462e3dcdhttp://social.msdn.microsoft.com/Forums/en-US/wpf/thread/04e39d80-85bc-48bf-8462-8ccaa3c8e503#b59f6112-8224-4406-8e2c-6011462e3dcdKenneth Hauglandhttp://social.msdn.microsoft.com/Profile/en-US/?user=Kenneth%20HauglandFrom datatable to xaml table documentHi<br/><br/>I do not understand what you mean... If you a datatable and want to make a XML tabel use WriteXML()<br/>If you have a XML table and want it in a datatable use ReadXML()<br/><br/><br/>well actually i was expecting to get the table directly from the datatable<br/><br/>Get what? The xml tabel?<br/><hr class="sig">KennethFri, 03 Jul 2009 15:12:24 Z2009-07-03T15:12:24Zhttp://social.msdn.microsoft.com/Forums/en-US/wpf/thread/04e39d80-85bc-48bf-8462-8ccaa3c8e503#d0a28244-aa53-47cf-96d6-7ddadf27a3a7http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/04e39d80-85bc-48bf-8462-8ccaa3c8e503#d0a28244-aa53-47cf-96d6-7ddadf27a3a7marck68http://social.msdn.microsoft.com/Profile/en-US/?user=marck68From datatable to xaml table documentxaml tableFri, 03 Jul 2009 21:14:37 Z2009-07-03T21:14:37Zhttp://social.msdn.microsoft.com/Forums/en-US/wpf/thread/04e39d80-85bc-48bf-8462-8ccaa3c8e503#b141911d-1297-4d97-a9d0-ddeeca3835bbhttp://social.msdn.microsoft.com/Forums/en-US/wpf/thread/04e39d80-85bc-48bf-8462-8ccaa3c8e503#b141911d-1297-4d97-a9d0-ddeeca3835bbKenneth Hauglandhttp://social.msdn.microsoft.com/Profile/en-US/?user=Kenneth%20HauglandFrom datatable to xaml table documentdim  ds as new dsystem.data.dataset<br/>ds.ReadXML(filename)<br/><br/>and you will have the datatable.... if its from a file<hr class="sig">KennethFri, 03 Jul 2009 23:40:22 Z2009-07-03T23:40:22Zhttp://social.msdn.microsoft.com/Forums/en-US/wpf/thread/04e39d80-85bc-48bf-8462-8ccaa3c8e503#44f8a0ba-f767-4489-8255-3706e608d49ahttp://social.msdn.microsoft.com/Forums/en-US/wpf/thread/04e39d80-85bc-48bf-8462-8ccaa3c8e503#44f8a0ba-f767-4489-8255-3706e608d49aMyexphttp://social.msdn.microsoft.com/Profile/en-US/?user=MyexpFrom datatable to xaml table documentmarck,  <div><br/> <div>kenneth's post is what I mean, save your data to xml and read from it with ReadXml or WriteXml. But now I confuse with your requirement of <strong><span style="text-decoration:underline">XAML Table</span></strong></div> <div>You want some method to generate xaml code for the DataTable? That is not supported. </div> </div><hr class="sig">ExperienceSat, 04 Jul 2009 03:38:30 Z2009-07-04T03:38:30Zhttp://social.msdn.microsoft.com/Forums/en-US/wpf/thread/04e39d80-85bc-48bf-8462-8ccaa3c8e503#f68b35bd-946e-4009-a478-67b2327ead76http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/04e39d80-85bc-48bf-8462-8ccaa3c8e503#f68b35bd-946e-4009-a478-67b2327ead76Jim Zhou - MSFThttp://social.msdn.microsoft.com/Profile/en-US/?user=Jim%20Zhou%20-%20MSFTFrom datatable to xaml table document<p class=MsoNormal style="margin:0cm 0cm 0pt;tab-stops:294.75pt"><span style="font-size:12pt"><span style="font-family:Calibri">Hi,</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt;tab-stops:294.75pt"><span style="font-size:12pt"><span style="font-family:Calibri"> </span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt;tab-stops:294.75pt"><span style="font-family:Calibri"><span style="font-size:12pt">I think Kenneth Haugland has provided a good post in your case. As far as in know, there is no direct approach to make conversion from a ADO.NET DataTable to a </span><span style="font-size:12pt">Table of type Block in WPF. You need to write your own code to wrap DataTable as a Table using</span><span style="font-size:12pt"> TableColumn <span style=""> </span>and TableRow.</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt;tab-stops:294.75pt"><span style="font-size:12pt"><span style="font-family:Calibri"><span style=""> </span>If you are still having any issues with this, you can elaborate on you scenario. Some sample code will be much better for others to understand you.</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt;text-indent:18pt;tab-stops:294.75pt"><span style="font-size:9pt;color:blue;font-family:新宋体"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt;tab-stops:294.75pt"><span style="font-size:12pt"><span style="font-family:Calibri">Thanks.</span></span></p>Thu, 09 Jul 2009 09:43:12 Z2009-07-09T09:48:50Zhttp://social.msdn.microsoft.com/Forums/en-US/wpf/thread/04e39d80-85bc-48bf-8462-8ccaa3c8e503#9ce03974-db51-441c-9338-566246a63211http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/04e39d80-85bc-48bf-8462-8ccaa3c8e503#9ce03974-db51-441c-9338-566246a63211Kenneth Hauglandhttp://social.msdn.microsoft.com/Profile/en-US/?user=Kenneth%20HauglandFrom datatable to xaml table documentIf you do have a <strong><span style="text-decoration:underline">XAML</span></strong> table and want to read it... I suggest you convert it to a txt file and read line by line.... It will be a tremendus task... If you can store and read it as a XML table you will save a lot of trouble....<br/><br/><hr class="sig">KennethThu, 09 Jul 2009 09:48:15 Z2009-07-09T09:48:15Z