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
740
Certain Nodes does not show the values
posted
Hi,I have the following database table ( only few records shown)  

Hi,

I have the following database table ( only few records shown)

 

component_id   com_component_id  description 

1                      NULL                      Extras

2                      NULL                      Hospital

3                      NULL                      Medical

4                      NULL                      Ambulance

5                      1                            Dental

6                      1                            Optical

7                      1                            Therapy

8                      1                             Medical Health

9                      1                             Health Mgt

10                    1                             Other Services

 

I need the tree to be displayed as this way:

Ambulance

Extras

                           Dental

                                   ---------

                                   ---------

                           Optical

                                                ---------

                                                 ---------

                           Therapy

                           Medical Health

                           Health Mgt

                          Other Services

Hospital

Medical

 

But it displays as below without showing the first records (e.g  Extras, Hospital etc)

 Dental

               ---------

                --------

 Optical

             ---------

              ---------

Therapy

             ---------

             ---------

Medical Health

            ---------

            ---------

Health Mgt

              ---------

              ---------

Other Services

              ---------

               ---------

 

 

I'm setting the Wintree's datasource to the table as follows and set the Value list as well:

this.utComponentTree.DataMember = "component$fk_componen_comp_topl_componen";

            this.utComponentTree.DataSource = this.componentBindingSource;

  

 componentBindingSource.DataSource = myMdi.myDatabaseService.dropDownCache;

            this.utComponentTree.ColumnSettings.ColumnSets[0].Columns["component_id"].ValueList = myMdi.myDatabaseService.getValueList("component");

 

CAN YOU PLEASE TELL ME WHAT HAS GONE WRONG?? Is it  com_component_id  has NULL values causing the problem..please URGENT help needed!!!

 

Thanks in Advance....

 

Parents
No Data
Reply
  • 69832
    Offline posted

    A DataTable represents its data in "flat" form, i.e., there is no hierarchical form to it. You would need to add the table to a DataSet's Tables collection, create the relationship(s) using the DataSet's Relations collection, assign the DataSet to the tree's DataSource, and the name of the relation to the DataMember property. There are several examples of this included with the NetAdvantage UltraTree samples.

Children
No Data