Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1965
webdatatree binding to dataset
posted
I have a webdatatree and i want to bind it to a dataset which contains a datatable with 5 rows. i only want the "name" values in the datatable to come in at the root node. How do i get this done?can someone provide me a working example? Similar situation with the child node.Please help!
  • 29417
    Offline posted

    Hello dev_here ,

     

    I’m just following up to see if you’ve been able to resolve your issue. If you have any questions or concerns or if you need further assistance please let me know.

     

    Best Regards,

    Maya Kirova

    Developer Support Engineer

    Infragistics, Inc.

    http://ko.infragistics.com/support

     

  • 29417
    Offline posted

    Hello dev_here

    Thank you for posting in our forum. 

    You’ll need to define the bindings for the tree in the DataBindings collection of the tree. For example if you have a parent table named “Parent” and you want to use a field named “Item” as the text field and another one called “id” for the ValueField you’ll need to define a DataTreeNodeBinding that looks like this:

    <ig:DataTreeNodeBinding DataMember="Parent" TextField="Item" ValueField="id" />

    The DataMember will define which one of the tables the specific binding should use. The Text and Value fields define from which columns the nodes should get their text and value.

    The same logic applies to the child nodes binding definitions. 

    Please refer to the attached sample and let me know if you have any questions.

     

    Best Regards,

    Maya Kirova

    Developer Support Engineer II

    Infragistics, Inc.

    http://ko.infragistics.com/support

     

    WDT_DataSet.zip