질문하기질문하기
 

답변됨From datatable to xaml table document

답변

  • 2009년 7월 3일 금요일 오후 3:12Kenneth Haugland 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     답변됨
    Hi

    I do not understand what you mean... If you a datatable and want to make a XML tabel use WriteXML()
    If you have a XML table and want it in a datatable use ReadXML()


    well actually i was expecting to get the table directly from the datatable

    Get what? The xml tabel?

    Kenneth

모든 응답

  • 2009년 7월 3일 금요일 오전 9:41Myexp 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    Hi, Do you want to show the datatable data as table on the window? http://msdn.microsoft.com/en-us/library/ms750416.aspx
    You can not expect datatable to generate the code, it can only generate xml code once you call WriteXml method.
    Experience
  • 2009년 7월 3일 금요일 오후 1:38marck68 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    well actually i was expecting to get the table directly from the datatable
  • 2009년 7월 3일 금요일 오후 3:12Kenneth Haugland 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     답변됨
    Hi

    I do not understand what you mean... If you a datatable and want to make a XML tabel use WriteXML()
    If you have a XML table and want it in a datatable use ReadXML()


    well actually i was expecting to get the table directly from the datatable

    Get what? The xml tabel?

    Kenneth
  • 2009년 7월 3일 금요일 오후 9:14marck68 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    xaml table
  • 2009년 7월 3일 금요일 오후 11:40Kenneth Haugland 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    dim  ds as new dsystem.data.dataset
    ds.ReadXML(filename)

    and you will have the datatable.... if its from a file
    Kenneth
  • 2009년 7월 4일 토요일 오전 3:38Myexp 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    marck, 

    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 XAML Table
    You want some method to generate xaml code for the DataTable? That is not supported. 

    Experience
  • 2009년 7월 9일 목요일 오전 9:43Jim Zhou - MSFT중재자사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    Hi,

     

    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 Table of type Block in WPF. You need to write your own code to wrap DataTable as a Table using TableColumn  and TableRow.

     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.

     

    Thanks.

  • 2009년 7월 9일 목요일 오전 9:48Kenneth Haugland 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    If you do have a XAML 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....


    Kenneth