none
Binding of a WPF treeView RRS feed

  • Question

  • Hi ,

     

    I am working on WPF Tree View and trying to bind this view to a object (a DataTable).

    I have Herarchical data in the sense that there are two columns having ID for the Items one is Parent of the Other .

    I have to show them in Hirarachical way following the same relation in a tree View.

     Since it is one Datatable I dont have any defined DataRelation . I know how to bind in case i had a dataSet and Datarelation. But I have only a Data Table. Can I have hirarachical Tree View . I have to bind at runtime.

     

     

    Bye

     

    Wednesday, September 5, 2007 9:43 AM

Answers


  • one idea whould be that you have a converter that returns a list ....
    Wednesday, September 5, 2007 6:58 PM
  • Hi Abhinav

     

    Base on my understanding, you have only a DataTable which cause you don't know how to bind it to a TreeView. I think that the most easy way is to create a DataSet, so you can use the DataSet as a wrapper of the DataTable.

     

    Best Regards

    Wei Zhou

    Friday, September 7, 2007 5:28 AM
    Moderator

All replies


  • one idea whould be that you have a converter that returns a list ....
    Wednesday, September 5, 2007 6:58 PM
  • Hi Abhinav

     

    Base on my understanding, you have only a DataTable which cause you don't know how to bind it to a TreeView. I think that the most easy way is to create a DataSet, so you can use the DataSet as a wrapper of the DataTable.

     

    Best Regards

    Wei Zhou

    Friday, September 7, 2007 5:28 AM
    Moderator